Skip to content

Instantly share code, notes, and snippets.

View leonklingele's full-sized avatar
💭
🫨

leonklingele

💭
🫨
View GitHub Profile
@glebm
glebm / RenderWhitespace.md
Last active September 26, 2017 11:17
Render whitespace on GitHub
@brunocalza
brunocalza / mmap-exec.go
Last active January 25, 2021 02:53
This a full example of how PROT_EXEC works in mmap. More about it at https://brunocalza.me/2021/01/10/discovering-and-exploring-mmap-using-go/
package main
import (
"fmt"
"unsafe"
"github.com/edsrzf/mmap-go"
)
func main() {
@mimoo
mimoo / README.md
Created March 8, 2021 04:48
Flamegraph of your asciidoc books

I wrote a very primitive script to produce a flamegraph out of a number of asciidoc files. See this blog post for some idea of the result.

flamegraph

WARNING: It's heavily taylored to my own setup, so not sure it'll work directly with yours, or you might have some customization to do. (If there's enough interest I could do a more general script / Dockerfile.)

How to use?

@pinge
pinge / ubuntu_14.04_macbook_pro_retina_15_inch_mid_2014.md
Last active March 10, 2021 03:05
How to install Ubuntu 14.04.1 LTS on a MacBook Pro Retina 15" Mid 2014 (11,3)
@AGWA
AGWA / cook_rsa_key.go
Last active April 13, 2021 15:36
Demonstrates that an RSA signature does not uniquely identify a public key.
/*
* Demonstrates that an RSA signature does not uniquely identify a public key.
* Given a signature, s, and a message m, it's possible to construct a new RSA key
* pair such that s is a valid signature for m under the new key pair.
*
* Requires Go version >= 1.5. Go <= 1.4 doesn't work due to a bug in the bignum
* package: https://github.com/golang/go/issues/9826
*
* Written in 2015 by Andrew Ayer <agwa@andrewayer.name>
*
@marick
marick / about_those_lava_lamps.md
Last active June 22, 2022 21:08
About Those Lava Lamps

Around 2006-2007, it was a bit of a fashion to hook lava lamps up to the build server. Normally, the green lava lamp would be on, but if the build failed, it would turn off and the red lava lamp would turn on.

By coincidence, I've actually met, about that time, (probably) the first person to hook up a lava lamp to a build server. It was Alberto Savoia, who'd founded a testing tools company (that did some very interesting things around generative testing that have basically never been noticed). Alberto had noticed that people did not react with any urgency when the build broke. They'd check in broken code and go off to something else, only reacting to the breakage they'd caused when some other programmer pulled the change and had problems.

@Belphemur
Belphemur / build_nginx.sh
Last active November 13, 2022 13:05 — forked from MattWilcox/build_nginx.sh
Compiling Nginx with LibreSSL (and http2)
#!/usr/bin/env bash
# names of latest versions of each package
export NGINX_VERSION=1.15.5
export VERSION_NGINX=nginx-$NGINX_VERSION
export VERSION_LIBRESSL=libressl-2.8.1
export VERSION_PCRE=pcre-8.42
#export NPS_VERSION=1.9.32.10
#export VERSION_PAGESPEED=v${NPS_VERSION}-beta

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns                     on recent CPU
L2 cache reference ........................... 7 ns                     14x L1 cache
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns                     20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs 4X memory

@technion
technion / acme-client-runner.rb
Last active August 8, 2023 16:29
Runs Acme Client
#!/usr/bin/env ruby
# We're going to need a private key.
require 'openssl'
# Initialize the client
require 'acme/client'
# We need an ACME server to talk to, see github.com/letsencrypt/boulder
ENDPOINT = 'https://acme-v01.api.letsencrypt.org/'
#ENDPOINT = 'https://acme-staging.api.letsencrypt.org'
ACCOUNT_FILE = 'account_key.pem'
@andy-thomason
andy-thomason / Genomics_A_Programmers_Guide.md
Created May 14, 2019 13:32
Genomics a programmers introduction

Genomics - A programmer's guide.

Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.

https://www.genomicsplc.com