Skip to content

Instantly share code, notes, and snippets.

View color.tex
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[dvipsnames]{xcolor}
\colorlet{LightRubineRed}{RubineRed!70!}
\colorlet{Mycolor1}{green!10!orange!90!}
\definecolor{Mycolor2}{HTML}{00F9DE}
\definecolor{matrixcolor}{HTML}{FF0000}
View .vimrc
so ~/.vim/sensible.vim
"dein Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath+=/Users/phil/.vim/dein.vim
View shell_aliases
# Be nice to your computer
alias please='sudo'
alias plz='sudo'
# file managing stuff
alias r="PYTHONOPTIMIZE=1 /usr/bin/ranger"
alias l='ls'
alias perm='stat -c %a'
# Dogit
@hellerbarde
hellerbarde / ipython
Created Oct 6, 2014
Demo of the dis module
View ipython
In [1]: import dis
In [2]: def foo(what):
...: a = []
...: a = a+4
...: print a[0]
...: b = what[1:4]
...: print b[-1]
...:
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 — forked from jboner/latency.txt
Latency numbers every programmer should know
View latency.markdown

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
You can’t perform that action at this time.