Skip to content

Instantly share code, notes, and snippets.

@karmi
karmi / .gitignore
Created August 17, 2012 19:13
World's Smallest Application Hosted in elasticsearch
.DS_Store
tmp/
function! MyFoldText() " {{{
let line = getline(v:foldstart)
let nucolwidth = &fdc + &number * &numberwidth
let windowwidth = winwidth(0) - nucolwidth - 3
let foldedlinecount = v:foldend - v:foldstart
" expand tabs into spaces
let onetab = strpart(' ', 0, &tabstop)
let line = substitute(line, '\t', onetab, 'g')
@jtimberman
jtimberman / macosx_bootstrap.sh
Created August 9, 2012 04:55 — forked from fnichol/macosx_bootstrap.sh
Mac OS X 10.7/10.8 (Lion/Mountain Lion) Bootstrapping
#!/usr/bin/env bash
set -e
# # Mac OS X 10.7/10.8 (Lion/Mountain Lion) Bootstrapping
#
# ## Pre-requisites
#
# 1. Set your hostname: In **System Preferences** go to **Sharing** and enter
# the name in **Computer Name**
# 2. Run **Software Update** and reboot if necessary
@ttscoff
ttscoff / CustomReaderGithub.css
Created June 17, 2012 11:49
Github style for the CustomReader Safari Extension
/* For use with the CustomReader Safari Extension */
/* <http://canisbos.com/customreader> */
body
{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-align: center;
background: url("linen.png");
color: black;
@maxpert
maxpert / HDD info
Created June 10, 2012 19:32
TokyoCabinet + LZ4 speedups
/dev/sda:
ATA device, with non-removable media
Model Number: ST3250312AS
Serial Number: Z2A1KYYX
Firmware Revision: JC45
Transport: Serial
Standards:
Used: unknown (minor revision code 0x0029)
Supported: 8 7 6 5
@kennethreitz
kennethreitz / flaskapp.py
Created June 9, 2012 15:38
My typical flask app base
# -*- coding: utf-8 -*-
import os
from flask import Flask
from flask_heroku import Heroku
from flask_sslify import SSLify
from raven.contrib.flask import Sentry
from flask.ext.celery import Celery
@calebd
calebd / README.md
Created June 7, 2012 04:22
Simple UITableView implementation using only HTML and CSS

@karmi
karmi / .gitignore
Created June 5, 2012 12:30
Three Nodes and One Cluster: Demo of ElasticSearch's Distributed Features
.DS_Store
logs/
data/
*.html
@jboner
jboner / latency.txt
Last active May 19, 2025 16:12
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
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 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@karmi
karmi / .gitignore
Created May 15, 2012 14:11
Mix'n'Match different metrics of ElasticSearch with Cubism.js
.DS_Store
tmp/**/*