Skip to content

Instantly share code, notes, and snippets.

Zeeshan Lakhani zeeshanlakhani

Block or report user

Report or block zeeshanlakhani

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
zeeshanlakhani /
Created Dec 3, 2015 — forked from slfritchie/
Erlang tracing, for the Riak source code reading series, 2014-03-18, Tokyo, Japan

Erlang Tracing: more than you wanted to know

Rough Outline

  • What can be traced?
  • How can trace events be specified?
  • "match specifications": twisty passages, all alike
  • WTF, can I just use DTrace and drink my coffee/beer/whisky in peace?
  • Trace delivery mechanisms: pick one of two
zeeshanlakhani / latency.txt
Created Oct 31, 2015 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
View latency.txt
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
zeeshanlakhani /
Created Jul 13, 2015
Andrew Stone's Great eqc_statem notes

Testing Stateful Code

So far, all the properties we have written have tested stateless code. Stateless code is made up of pure functions and is inherently easier to test than stateful code with side effects. The chief problem with testing stateful code is that the input to output mapping depends on the current state of the program. Previous operations can cause the same function to return different output given the same input. Therefore, in order to test stateful code, our tests must maintain some state of their own. This state is known as the model state and is updated as part of the testing process.

View gist:f2f1d6633c01cd24a490

Keybase proof

I hereby claim:

  • I am zeeshanlakhani on github.
  • I am zeeshanlakhani ( on keybase.
  • I have a public key whose fingerprint is 1AC6 B34F BA77 A396 AB72 6F85 5D47 A705 052B 85B3

To claim this, I am signing this object:

View clojure-irc-pdf-links


This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"


View euler1.factor
USING: kernel math sequences ;
IN: euler1
: multiple-of ( x y -- z ) mod zero? ;
: euler1 ( x -- y )
1 - iota [ 1 + ] map
[ dup [ 3 multiple-of ] [ 5 multiple-of ] bi or [ ] [ drop 0 ] if ]
View minikanren notes.txt
four primitives: run*, ==, conde, fresh
(run* (q)
(== q #t))
; for what values of q is q equal to true?
answer: q must also be #t, so
'(#t) ; answer comes back in a list
View macros-in.jl
# time
# ====
macro time(ex)
local t0 = time_ns()
local val = $(esc(ex))
local t1 = time_ns()
println("elapsed time: ", (t1-t0)/1e9, " seconds")
View markerbot_core.clj
(ns markerbot.core
(:require [taoensso.timbre :as log]
[ :as json]
[clojure.string :as s]
[clj-http.client :as client])
(:import ( Socket)
( PrintWriter InputStreamReader BufferedReader))
;; marksy
You can’t perform that action at this time.