Skip to content

Instantly share code, notes, and snippets.

View ahausmann's full-sized avatar

Alexander Hausmann ahausmann

View GitHub Profile
@ahausmann
ahausmann / latency.txt
Last active December 7, 2015 14:47 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (extended for WPF/C#)
------------------------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
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
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
@ahausmann
ahausmann / main.js
Last active August 29, 2015 14:21
Java Class file structure for Okteta, extended from example with field_info, method_info and attribute_info
var constantType = {
'Class': 7,
'Fieldref': 9,
'Methodref': 10,
'InterfaceMethodref': 11,
'String': 8,
'Integer': 3,
'Float': 4,
'Long': 5,
'Double': 6,
@ahausmann
ahausmann / fix-cursor
Created February 7, 2015 19:45
Bash script to update cursor settings in X database, gtk2 and gtk3
#!/bin/bash
# Identifies which source contains the values that should be applied to all other sources
#
# Valid values:
# gtk3 GTK3 configuration / dconf
# Supports cursor theme and size
# gtk2 GTK2 configuration (uses gconftool-2)
# Supports cursor theme and size
# xdefaults Reads values from ~/.Xdefaults