View keybase.md

Keybase proof

I hereby claim:

  • I am granth on github.
  • I am granth (https://keybase.io/granth) on keybase.
  • I have a public key ASB_NEH5NkH1XPdv_R8l78hNyhDW6QxriSw6D6QPMXiYRwo

To claim this, I am signing this object:

View delayed_job_airbrake.rb
module Delayed
module Plugins
class Airbrake < Plugin
module Notify
def error(job, error)
::Airbrake.notify_or_ignore(error)
super
end
end
View gist:1005312
export PS1='\[\033]0;\w\007\[\033[0;32m\]\W\[\033[0;38m\] $(git_branch)$(prompt_status "%s") '
prompt_status() {
local branch=$(__git_ps1 "%s")
if [ -n "$branch" ]; then
if git_dirty; then
echo ""
return
fi
View gist:940639
# repair busted iTunes file locations with macirb
framework 'ScriptingBridge'
itunes = SBApplication.applicationWithBundleIdentifier("com.apple.itunes")
load_bridge_support_file 'iTunes.bridgesupport'
class SBElementArray
def [](value)
self.objectWithName(value)
View config.ru
# Rack file for local Rubygems server, using YARD
require "rubygems"
require "yard"
libraries = {}
Gem.source_index.find_name('').each do |spec|
libraries[spec.name] ||= []
libraries[spec.name] << YARD::Server::LibraryVersion.new(spec.name, spec.version.to_s, nil, :gem)
end
View 1kbgrid.sass
// http://1kbgrid.com as a sass file.
@for !i from 1 through !number_of_columns
.grid_#{!i}
width = (!column_width + !gutter_width) * !i - !gutter_width
.column
margin = "0 #{!gutter_width / 2}"
overflow: hidden
float: left
View git-status
export PATH=$HOME/bin:/usr/local/bin:/usr/local/git/bin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:/usr/local/sbin:/usr/X11R6/bin:$PATH
source /usr/local/git/contrib/completion/git-completion.bash
prompt_status() {
local branch=$(__git_ps1 "%s")
if [ -n "$branch" ]; then
if git_dirty; then
echo "⚡"
return
View Add Pinboard Bookmark
-- save as "Add Pinboard Bookmark.scpt" in ~/Library/Scripts/Applications/Safari
-- assign it ⌘D in FastScripts to use instead of Safari's bookmarks
tell application "Safari"
set pinboardBookmarklet to "
document.location = 'http://pinboard.in/add?next=same' +
'&url=' + encodeURIComponent(location.href) +
'&title=' + encodeURIComponent(document.title);
"
do JavaScript pinboardBookmarklet in document 1
View gist:62046
# available domain names
# http://gilesbowkett.blogspot.com/2009/02/simple-bash-domain-availability.html
domainavailable() {
if whois $1 | grep "No match for" &>/dev/null; then
echo "$1 is available"
return 0
else
echo "$1 is not available"
return 1;
fi
View gist:56935
tell application "Twitterrific"
set peep to screen name of selection
set twid to id of selection
open location "http://twitter.com/" & peep & "/status/" & twid
end tell