Skip to content

Instantly share code, notes, and snippets.

View ashee's full-sized avatar

Amitava Shee ashee

View GitHub Profile
@ashee
ashee / ldaps.sh
Created September 14, 2011 14:35
ldapsearch
amitava$ ldapsearch -x -H "ldaps://ldap.ent.med.umich.edu:636" -D "cn=<sys_acct>,ou=people,dc=med,dc=umich,dc=edu" -W -b "dc=med,dc=umich,dc=edu" uid=<uid>
anonymous
anonymous / gist:951335
Created May 2, 2011 09:11
~/projects/jruby ➔ jruby --server -rbenchmark -Xcompile.invokedynamic=true -J-XX:MaxInlineSize=150 -J-XX:InlineSmallCode=3000 bench/language/bench_attr_assign.rb 5
user system total real
1m native attr asgns 1.856000 0.000000 1.856000 ( 1.794000)
1m native attr reads 0.387000 0.000000 0.387000 ( 0.387000)
1m ruby attr asgns 0.968000 0.000000 0.968000 ( 0.968000)
1m ruby attr reads 0.287000 0.000000 0.287000 ( 0.287000)
user system total real
1m native attr asgns 0.484000 0.000000 0.484000 ( 0.484000)
1m native attr reads 0.211000 0.000000 0.211000 ( 0.211000)
1m ruby attr asgns 0.492000 0.000000 0.492000 ( 0.492000)
@krestenkrab
krestenkrab / funhack.erl
Created April 12, 2011 09:52
The programmatic counter-part for "fun Mod:Fun/Arity"
-module(funhack).
-export([mkfun/3]).
%% @doc
%% The programmatic counter-part for `fun Mod:Fun/Arity'.
%%
%% Erlang syntax does not allow usage of the `fun' syntax,
%% where Mod, Fun and Arity are variables; they need to be
%% atom, atom, integer. This little hack lets you avoid
%% writing `fun(A1,A2,A3...) -> Mod:Fun(A1,A2,A3,...) end'.
@retronym
retronym / type-bounds.scala
Created December 16, 2009 11:17
Tour of Scala Type Bounds
class A
class A2 extends A
class B
trait M[X]
//
// Upper Type Bound
//
def upperTypeBound[AA <: A](x: AA): A = x
@jacobian
jacobian / unicorn.py
Created October 6, 2009 22:39
Simple preforking echo server in Python.
"""
Simple preforking echo server in Python.
Python port of http://tomayko.com/writings/unicorn-is-unix.
"""
import os
import sys
import socket