Skip to content

Instantly share code, notes, and snippets.

@jtimberman
jtimberman / macbook.md
Created November 12, 2010 14:48
How I set up my workstation

My current workstation toolchain environment was set up with the following, roughly in order.

  1. Latest Xcode from Apple to get development tools.

  2. Homebrew.

  3. A few nice things with Homebrew:

    brew install git ack wget tmux sloccount ec2-ami-tools ec2-api-tools rds-command-line-tools

@blaix
blaix / chat-client.html
Created September 2, 2010 04:59
Playing with websockets and EventMachine in the most cliche way possible.
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>omgsockets</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script>
$(document).ready(function() {
var ws = new WebSocket('ws://localhost:3000');
ws.onmessage = function(msg) {
@kennethreitz
kennethreitz / .aliases
Created April 25, 2010 20:38
My environment configuration
alias ports='sudo lsof -iTCP -sTCP:LISTEN -P'
alias dnsflush='dscacheutil -flushcache'
alias git-add='git add -A'
alias dmesg="sudo dmesg"
alias l='ls -lrtha'
alias dir='ls -lh'
alias svnscrub='find . -name .svn -exec rm -rf {} \;'
alias vpnfix='sudo route -nv add -net 10 -interface utun0 && sudo route change default 10.0.1.1'
alias gitx='/Applications/GitX.app/Contents/MacOS/GitX &'
require 'geoip'
module Rack
# Rack::GeoIPCountry uses the geoip gem and the GeoIP database to lookup the country of a request by its IP address
# The database can be downloaded from:
# http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
#
# Usage:
# use Rack::GeoIPCountry, :db => "path/to/GeoIP.dat"
#