Skip to content

Instantly share code, notes, and snippets.

View iamakulov's full-sized avatar

Ivan Akulov iamakulov

View GitHub Profile
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active August 31, 2025 10:55
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@gfixler
gfixler / lofp_rank
Last active April 2, 2024 20:17
Current placement on the Standardized Ladder of Functional Programming
Standardized Ladder of Functional Programming
http://lambdaconf.us/downloads/documents/lambdaconf_slfp.pdf
Level Key
0: I've never heard of this
1: I've heard of this
2: I've looked into this, but don't get it yet
3. I have a basic understanding/am using this
4. I've used this for a while/feel pretty solid on
5. I could comfortably teach this to others
anonymous
anonymous / test_env.js
Created November 7, 2017 11:16
var process_copy = Object.assign({}, process);
var process_ref = process;
process_copy.env = Object.assign({}, process.env);
var lab1 = 'normal process.env';
var lab2 = 'process copy env';
console.time(lab1);
var no_discard = false;
for(var i = 0; i < 1e7; i++) {
no_discard = no_discard || (process_ref.env.NODE_ENV == Math.random());
@wilsonpage
wilsonpage / swr.ts
Last active March 28, 2025 09:35
An implementation of stale-while-revalidate for Cloudflare Workers
export const CACHE_STALE_AT_HEADER = 'x-edge-cache-stale-at';
export const CACHE_STATUS_HEADER = 'x-edge-cache-status';
export const CACHE_CONTROL_HEADER = 'Cache-Control';
export const CLIENT_CACHE_CONTROL_HEADER = 'x-client-cache-control';
export const ORIGIN_CACHE_CONTROL_HEADER = 'x-edge-origin-cache-control';
enum CacheStatus {
HIT = 'HIT',
MISS = 'MISS',
REVALIDATING = 'REVALIDATING',