Skip to content

Instantly share code, notes, and snippets.

@slant
slant / aprompt.png
Created December 8, 2012 01:42 — forked from mislav/aprompt.png
My zsh prompt. No oh-my-zsh needed
aprompt.png
@slant
slant / .irbrc
Created May 31, 2012 21:24 — forked from jwaldrip/.irbrc
Keep your irb console history, save this to your home dir.
require 'irb/completion'
require 'irb/ext/save-history'
ARGV.concat [ "--readline",
"--prompt-mode",
"simple" ]
# 1500 entries in the list
IRB.conf[:SAVE_HISTORY] = 1500
@slant
slant / cloudapp.rb
Created August 17, 2011 16:07 — forked from aashay/cloudapp.rb
CloudApp script
#!/usr/bin/env ruby
#
# cloudapp
# Hacked together with duct tape, hopes, and dreams by Aashay Desai / @aashay
# Original by Zach Holman / @holman
#
# Uploads a file from the command line to CloudApp, drops it into your clipboard
#
# Example:
#
@slant
slant / gist:599345
Created September 27, 2010 16:47 — forked from anonymous/gist:594093
unless existing_product.productcategorynames.nil?
existing_product.productcategorynames.split(',').each do |cn|
unless category_table[cn].nil?
category_name = category_table[cn]
tool.category = category_name unless tool.archived == 1
end
end
end
@slant
slant / gist:299650
Created February 9, 2010 20:54 — forked from retr0h/gist:98308
CONTENT_TYPES = {:html => 'text/html', :css => 'text/css', :js => 'application/javascript'}
before do
request_uri = case request.env['REQUEST_URI']
when /\.css$/ : :css
when /\.js$/ : :js
else :html
end
content_type CONTENT_TYPES[request_uri], :charset => 'utf-8'
end

HOWTO: iPhone AT&T Tethering

In 10 steps:

  • Update iTunes to 8.2 via Software Update
  • Update your iPhone to the 3.0 release (out today - June 17th)
  • Download this dmg and mount it: tethering file
  • Enable hidden carrier testing option (in Terminal.app): defaults write com.apple.iTunes carrier-testing -bool TRUE
  • Start up iTunes

HOWTO: iPhone AT&T Tethering

In 10 steps:

  • Update iTunes to 8.2 via Software Update
  • Update your iPhone to the 3.0 release (out today - June 17th)
  • Download this dmg and mount it: tethering file
  • Enable hidden carrier testing option (in Terminal.app): defaults write com.apple.iTunes carrier-testing -bool TRUE
  • Start up iTunes
This file: /Library/LaunchDaemons/org.postgresql.dbms.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.postgresql.dbms</string>
<key>UserName</key>