Skip to content

Instantly share code, notes, and snippets.

@dharamgollapudi
dharamgollapudi / Bench
Created October 12, 2013 23:28 — forked from joaodrp/Bench
(sinatra + thin) vs. goliath
# Simple web service that looks for an image metadata record on a MySQL db given its ID and sends it back in JSON
#
# Ruby 1.9.3
# All gems updated to the most recent version
# MBP i5 8gb Lion
#
# See source code above, combo is:
# Sinatra + Thin:
# - mysql_db.rb # mysql2 api class
# - sinatra_thin_server.rb
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@jnx
jnx / rbenv-install-system-wide.sh
Created October 1, 2011 20:09
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path: