Skip to content

Instantly share code, notes, and snippets.

@flyingoctopus
flyingoctopus / delete-branch.sh
Created April 17, 2012 16:18 — forked from pgib/delete-branch.sh
Delete multiple local/remote git branches. (Put this in your shell's profile and smoke it!)
delete-branch()
{
for i in `echo $*`; do
echo "Deleting local and remote branch $i..."
git push origin :$i
git branch -D $i
done
}
@flyingoctopus
flyingoctopus / dlchromium.sh
Created April 16, 2012 21:48 — forked from lg/dlchromium.sh
Download Latest Nightly Chromium For Mac
if [ $(ps aux | grep "Chromium.app" | grep -v grep | wc -l) -gt 0 ]; then
echo "Please close all Chromium instances before running this script"
exit 1
fi
if [ $(whoami) != "root" ]; then
echo "Please run this script with sudo to allow for installation into /Applications"
exit 1
fi
@flyingoctopus
flyingoctopus / README.md
Created March 22, 2012 06:54 — forked from tjogin/README.md
Configuration file to use PHP with Ruby rack

Installation

First you need php-cgi, i used brew with Formula below:

$ curl -O https://raw.github.com/gist/1194269/7ae1709453a8a19ce9c030bf41d544dd08d96d85/php.rb
$ mv php.rb `brew --prefix`/Library/Formula
$ brew install php --with-mysql

Second, install this ruby gems:

@flyingoctopus
flyingoctopus / osx_lion_rail_setup.md
Created March 7, 2012 07:36 — forked from jpantuso/osx_lion_rail_setup.md
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, rails, and MySQL
@flyingoctopus
flyingoctopus / outside_temp.rb
Created November 11, 2011 01:19 — forked from pgib/outside_temp.rb
Get me some temperatures for screen's backtick!
#!/usr/bin/env ruby
# encoding: UTF-8
require 'rubygems'
# https://github.com/jnunemaker/google-weather/
# gem install google-weather
require 'google_weather'
# usage: outside_temp.rb [City,Province|Postal Code]
if ARGV.size == 0
@flyingoctopus
flyingoctopus / archive_github_repo.sh
Created October 17, 2011 22:55 — forked from pgib/archive_github_repo.sh
Put this in your shell's respective dot profile and smoke it!
archive_github_repo()
{
if [ ! -d .git ]; then
echo "You must run this from within the root of your git repo."
exit 1
fi
pwd=`pwd`
repo_url=`git config --local --get remote.origin.url`
repo_name=`echo $repo_url | awk -F / '{print $2}' | sed -e s/.git//`
@flyingoctopus
flyingoctopus / .inputrc
Created September 8, 2011 18:57 — forked from tpope/.inputrc
Basic amenities for vi readline bindings
set keymap vi-insert
Control-a: beginning-of-line
Control-b: backward-char
Control-d: delete-char
Control-e: end-of-line
Control-f: forward-char
Control-k: kill-line
Control-n: next-history
Control-p: previous-history
set keymap emacs-ctlx
@flyingoctopus
flyingoctopus / coffee-stained-paper.js
Created August 31, 2011 23:33 — forked from mnmly/coffee-stained-paper.js
A tiny shim for Paper.js/CoffeeScript prototyping
window.stainedPaper = function (func) {
var canvas = document.createElement('canvas');
document.body.appendChild(canvas);
paper.setup(canvas);
func.call(paper);
};