Skip to content

Instantly share code, notes, and snippets.

View aruld's full-sized avatar
🎯
Focusing

Arul Dhesiaseelan aruld

🎯
Focusing
View GitHub Profile
@aruld
aruld / install_jdk5_mtn_lion.sh
Last active December 13, 2015 18:49 — forked from bric3/install_jdk5_post_lion.sh
This is a fork from https://gist.github.com/bric3/1163008 # 2013/06/10 Tested on Mountain Lion 10.8.4 # 2013/02/14 Updated to run on Mountain Lion 10.8.2
#!/bin/bash
# This script is edited by Brice Dutheil.
# See there in french http://blog.arkey.fr/2012/07/30/script-pour-installer-le-jdk-5-sur-macosx-lion/
# Translate button is broken for now, please use Google to translate this website.
# 2013/06/10 Tested on Mountain Lion 10.8.4
# 2013/02/14 Updated to run on Mountain Lion 10.8.2
#
# 2012/08/25 This script didn't behave correctly when ran on 10.8.1
# Added recommendation to always run this script after updates such as Java, XCode, OSX, etc.
@aruld
aruld / YFact.java
Created October 27, 2012 20:12 — forked from jonbodner/YFact.java
Generic Y Combinator in Java 8 using lambdas
//based on code from http://www.arcfn.com/2009/03/y-combinator-in-arc-and-java.html and the generic version https://gist.github.com/2571928
class YFact {
// T function returning a T
// T -> T
public static interface Func<T> {
T apply(T n);
}
// Higher-order function returning a T function
@aruld
aruld / latency.txt
Created June 16, 2012 08:27 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
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
Read 4K randomly from SSD* 150,000 ns 0.15 ms