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 gbd() { | |
if [[ -n $1 ]]; then | |
if [[ -n $2 ]]; then | |
git push $1 :$2 | |
git branch -d $2 | |
else | |
git push origin :$1 | |
git branch -d $1 | |
fi | |
fi |
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
#!/bin/bash | |
curl -s https://rvm.beginrescueend.com/install/rvm | bash | |
'[[ -s "/Users/release/.rvm/scripts/rvm" ]] && source "/Users/release/.rvm/scripts/rvm"\nexport JAVA_HOME=/Library/Java/Home\nexport JRE_HOME=/Library/Java/Home\nexport JAVA_OPTS="-Djava.awt.headless=true -Xmx2048M"' > /Users/release/.profile | |
source /Users/release/.profile | |
rvm install --force ruby-1.8.7-p352 | |
rvm install --force ree |
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
#!/bin/bash | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.git.com/gist/323731)" | |
brew install tomcat | |
brew install wget | |
brew install jenkins | |
brew install node |
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
namespace :snapshots do | |
desc "cull all snapshots except for 1st of each month and last 60 days." | |
task :cull do | |
ec2 = Configuration.instance.connection | |
snaps = ec2.describe_snapshots | |
snaps = snaps.select {|s| DateTime.parse(s[:aws_started_at]) < 60.days.ago } | |
snaps.inject({}) { |newhash, h| newhash[Time.parse(h[:aws_started_at])] = h; newhash } | |
saved = newhash.keys.group_by { |date| date.month }.map { |k, v| v.first } | |
saved.each do |key| | |
snaps.delete key |
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
set -g default-terminal "screen-256color" | |
# Use the system pasteboard | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
# Bind Control key to match Screen | |
set -g prefix C-a | |
# Use vi key bindings | |
set -g status-keys vi |
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
numbers = [1,2,3,4,5,6,7,8,9] | |
target = 50 | |
k = 5 | |
def calculate_sum(inputs, k) | |
inputs.each_index do |i| | |
pairing = [inputs[i]] | |
inputs.each_index do |j| | |
next if i == j |
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
def create | |
@glitch = current_user.glitches.new(params[:glitch]) | |
respond_to do |format| | |
if @glitch.save | |
UserMailer.glitch(@glitch).deliver | |
format.xml { render :xml => @glitch, :status => :created, :location => @glitch } | |
format.json { render :json => @glitch } | |
else | |
format.xml { render :xml => @glitch.errors, :status => :unprocessable_entity } |
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
~/Sites/outright.github.com[master]% gem list | |
*** LOCAL GEMS *** | |
rake (0.9.2 ruby) | |
rubygems-update (1.8.8) | |
~/Sites/outright.github.com[master]% gem install jekyll | |
Fetching: liquid-2.2.2.gem (100%) | |
Fetching: fast-stemmer-1.0.0.gem (100%) | |
Building native extensions. This could take a while... |
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
#!/bin/bash | |
exec god -D |
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
Reference: | |
refs/heads/* | |
Owner | |
Administrators | |
Anonymous Users | |
Create Reference | |
Administrators | |
Anonymous Users | |
Push | |
Administrators |