Skip to content

Instantly share code, notes, and snippets.

View adragomir's full-sized avatar

Andrei Dragomir adragomir

View GitHub Profile
@adragomir
adragomir / mountain-lion-brew-setup.markdown
Created August 3, 2012 10:33 — forked from myobie/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

set pc, kernel_start
:clock
dat 0xffff
:get_hardware; () -> void
hwn i
.loop
sub i, 1
hwq i
@adragomir
adragomir / latency.markdown
Created August 3, 2012 10:34 — 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
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@adragomir
adragomir / rails-backbone-test-setup.md
Created August 3, 2012 10:46 — forked from smakman/rails-backbone-test-setup.md
Setting up a Rails backbone project with Jasmine, RSpec, Capybara, Guard and Spork

Rails backbone test setup

This gist describes how to setup a rails backbone project with testing frameworks.

Gemfile

Example Gemfile to start with.

Netstrings
D. J. Bernstein, [email protected]
19970201
1. Introduction
A netstring is a self-delimiting encoding of a string. Netstrings are
very easy to generate and to parse. Any string may be encoded as a
netstring; there are no restrictions on length or on allowed bytes.
/***********************************************************************
vmtouch - the Virtual Memory Toucher
Portable file system cache diagnostics and control
by Doug Hoyte ([email protected])
Compilation:
gcc -Wall -O3 -o vmtouch vmtouch.c
@adragomir
adragomir / _vimrc.vim
Created August 9, 2012 09:01
Taverius' _vimrc
" _vimrc @ (c) Leonardo Valeri Manera, 2010, 2011
" Contains code from Ciaran McCreesh's .vimrc
" Contains code from amix the lucky stiff's .vimrc
" Contains code from Dominique Pelle's .vimrc
" Contains code from Henning Hasemann's .vimrc
" Contains code from Matthew Woznisky's .vimrc
cd $HOME
let g:skip_loading_mswin = 1
@adragomir
adragomir / get-your-vim-on.md
Created August 31, 2012 12:36 — forked from codelahoma/get-your-vim-on.md
Get Your Vim On
@adragomir
adragomir / get-your-vim-on.md
Created August 31, 2012 12:36 — forked from codelahoma/get-your-vim-on.md
Get Your Vim On
@adragomir
adragomir / thrift.rb
Created September 10, 2012 08:26
Patched homebrew recipe for thrift with patches for SDH
require 'formula'
class Thrift < Formula
homepage 'http://thrift.apache.org'
url 'http://www.apache.org/dyn/closer.cgi?path=thrift/0.8.0/thrift-0.8.0.tar.gz'
sha1 '1d652d7078d9cc70e2a45d3119b13e86ebd446da'
head 'http://svn.apache.org/repos/asf/thrift/trunk'
depends_on 'boost'