package main | |
import ( | |
"fmt" | |
"unsafe" | |
"github.com/edsrzf/mmap-go" | |
) | |
func main() { |
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.
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 install Ubuntu 14.04.1 LTS 64-bit on a MacBook Pro Retina 15" Mid 2014 (11,3)
- Ubuntu 14.04 Desktop 64-bit ISO (default, non-Mac version)
http://www.ubuntu.com/download/desktop - UNetbootin
http://unetbootin.sourceforge.net/ - Broadcom 802.11 Linux STA wireless driver source dependencies
http://packages.ubuntu.com/trusty/all/dkms/download
/* | |
* 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> | |
* |
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.
#!/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 | |
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
#!/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 is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.