This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/@\1/' | |
} | |
function prompt { | |
local BLACK="\[\033[0;30m\]" | |
local VIOLET="\[\033[1;35m\]" | |
local CYAN="\[\033[1;36m\]" | |
local RESET="\[\033[0m\]" | |
local GREEN="\[\033[0;32m\]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// makes navigation bar disappear when this view about to come on | |
- (void) viewWillAppear:(BOOL)animated | |
{ | |
[self.navigationController setNavigationBarHidden:YES animated:animated]; | |
[super viewWillAppear:animated]; | |
} | |
// makes navigation bar appear when this view is about to go away | |
- (void) viewWillDisappear:(BOOL)animated | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[color] | |
ui = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = yellow bold | |
frag = magenta bold | |
old = red bold |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# EC2 | |
export EC2_HOME=~/.ec2 | |
export PATH=$PATH:$EC2_HOME/bin | |
export EC2_PRIVATE_KEY=`ls $EC2_HOME/pk-*.pem` | |
export EC2_CERT=`ls $EC2_HOME/cert-*.pem` | |
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home/ | |
# colors | |
export TERM=xterm-color | |
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ported to ruby by [email protected] | |
require 'rubygems' | |
require 'base64' | |
gem 'json' | |
require 'json' | |
require 'openssl' | |
def parse_facebook_request(str, app_secret) | |
string = str.split(".") # splits our signed request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var s=document.createElement('script'); | |
s.setAttribute('src','https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'); | |
if(typeof jQuery!='undefined') { | |
var msg='This page already using jQuery v' + jQuery.fn.jquery; | |
} else { | |
document.getElementsByTagName('head')[0].appendChild(s); | |
var msg='This page is now jQuerified' | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
color molokai2 | |
set guioptions=aAce | |
set columns=120 | |
set guifont=Inconsolata:h12 | |
set wrap | |
" screw those standards, i like my tabs being just that. tabs. | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
pages = 78 | |
username = "fred" | |
def grab_url(offset) | |
Nokogiri::HTML(open("http://ffffound.com/home/#{username}/found/?offset=#{offset}")) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# system, ruby, apache | |
apt-get update | |
apt-get upgrade | |
apt-get install ruby ruby-dev libopenssl-ruby rdoc ri irb build-essential wget ssl-cert apache2 libcurl4-openssl-dev libssl-dev zlib1g-dev apache2-prefork-dev libapr1-dev libaprutil1-dev git-core libxml2-dev libxslt-dev mysql-server | |
# rubygems | |
cd /tmp | |
wget http://production.cf.rubygems.org/rubygems/rubygems-1.5.3.tgz | |
tar zxf rubygems-1.5.3.tgz | |
cd rubygems-1.5.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'AWS' | |
ACCESS_KEY_ID = "" | |
SECRET_KEY = "" | |
NODEGROUP = "" | |
@ec2 = AWS::EC2::Base.new(:secret_access_key => SECRET_KEY, :access_key_id => ACCESS_KEY_ID) | |
output = "" |
OlderNewer