This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { send, doWork } from "./lib.mjs"; | |
import cluster from "node:cluster"; | |
const NAME = process.env.NAME; | |
export async function onMessage(message) { | |
if (cluster.worker.message !== message) { | |
cluster.worker.message = message; | |
} else { | |
return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$privateKey = 'someprivatekey'; | |
$secretInfo = 'secretInfo'; | |
$method = 'aes-256-cbc'; | |
$ivLength = openssl_cipher_iv_length($method); | |
$iv = random_bytes($ivLength); | |
$encryptedData = openssl_encrypt($secretInfo, $method, $privateKey, OPENSSL_RAW_DATA, $iv); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import csv | |
import sys | |
import argparse | |
import datetime | |
parser=argparse.ArgumentParser( | |
description='''By default it will parse the today's logs''' | |
) | |
parser.add_argument('-d', type=int, default=1, help='set the number of days you would like to parse the logs. dafault 1 day.') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3 | |
import concurrent.futures | |
from math import floor, sqrt | |
import time | |
def is_prime(number: int) -> bool: | |
if not (number & 1): return 0 | |
iteration = floor(sqrt(number)) + 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3 | |
import concurrent.futures | |
from math import floor, sqrt | |
import time | |
def is_prime(number: int) -> bool: | |
if not (number & 1): return 0 | |
iteration = floor(sqrt(number)) + 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3 | |
from math import floor, sqrt | |
import time | |
def is_prime(number: int) -> bool: | |
if not (number & 1): return 0 | |
iteration = floor(sqrt(number)) + 1 | |
for i in range(3, iteration, 2): |
NewerOlder