Skip to content

Instantly share code, notes, and snippets.

View mrietveld's full-sized avatar

Marco Rietveld mrietveld

View GitHub Profile
@mrietveld
mrietveld / latency.markdown
Last active February 7, 2019 15:54 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns

Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Read 1 MB sequentially from memory ..... 250,000 ns  = 250 µs
@mrietveld
mrietveld / mac-external-partition.md
Last active May 5, 2018 21:25
Mac Partitioning Tips
@mrietveld
mrietveld / rebranch.pl
Last active October 7, 2021 14:06
The rebranch.pl script for rebasing all (working) branches onto master.
#!/usr/bin/perl
use Cwd;
use Time::Local;
use Getopt::Std;
use POSIX 'strftime';
our($opt_h, $opt_p, $opt_r, $opt_s, $opt_u, $opt_v, $opt_O, $opt_P, $opt_U, $opt_S, $opt_a );
getopts('hpr:s:uvO:U:P:a');
@mrietveld
mrietveld / Quotes.md
Last active November 16, 2016 14:17
A List of Interesting Quotes

Building a scheme first and then crafting a cryptographic model in which the scheme can be proved secure can result in schemes whose security breaks down in practice.

-- Breaking Web Applications Built On Top of Encrypted Data by Grubbs, P; Mcpherson, R; Naveed, M [2016]

@mrietveld
mrietveld / LaptopSetup.md
Last active October 7, 2021 14:13
What I Currently Use

What I currently use

Updated: 2021-10-06

OS

@mrietveld
mrietveld / changePomVersion.pl
Created April 4, 2014 07:45
Perl file ("changePomVersion.pl") to change version of an artifact in a pom.xml.
#!/usr/bin/perl
# This file takes 2 arguments when run:
# -p <POMFILE>
# -v <VERSION>
#
# The <POMFILE> argument is the path to a pom.xml file whose version should be changed
# The <VERSION> argument is the new version that should replaced the existing version
#
@mrietveld
mrietveld / update.pl
Created August 14, 2013 15:36
The update.pl script for updating multiple git repositories.
#!/usr/bin/perl
use Cwd;
use Time::Local;
use Getopt::Std;
getopts('s:f:a:h');
if( $opt_h ) {
die( "skip: -s\n"