This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Watch paths (given as arguments), automatically build when something changes. | |
# The script does a couple opinionated things to make my life easier: | |
# | |
# * Terminal scrollbuffer is reset before each iteration, simplifying scrolling. | |
# * I use a filter script to colorize gcc output (clang errors would be nicer). | |
# * Output is copied to a log file (/tmp/build.log). | |
# - I open this file in Sublime or vim, which reloads the file on change (each build). | |
# | |
# Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# HAProxy Performance Statistics | |
# by Steve Kamerman | |
# | |
# To use, pipe your HAProxy log with timing information (like "0/0/1/1/3 200") to | |
# this script. It will output min, max, med, avg and a latency distribution graph. | |
# | |
# Info on timing logging in HAProxy: http://code.google.com/p/haproxy-docs/wiki/TimingEvents | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(04:20:13 PM) hlveheart: Oh awesome, there's an IRC channel | |
(04:20:23 PM) chiel: \o/ | |
(04:20:58 PM) hlveheart: \o/. I'm having an affair guys. | |
(04:21:01 PM) ***hlveheart looks around | |
(04:21:05 PM) hlveheart: HER NAME IS SPOTIFY :) | |
(04:22:22 PM) lfranchi: hlveheart: bad news, you have to share | |
(04:24:03 PM) hlveheart: :{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Upgrade PostgreSQL from 9.0 to 9.1 | |
# | |
# by David Sommers | |
# | |
brew update postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
# | |
# Requires statlib http://code.google.com/p/python-statlib/ | |
""" | |
process_tornado_bm.py | |
Created by Jacob Kristhammar on 2010-12-09. | |
""" |