Skip to content

Instantly share code, notes, and snippets.

View zachhale's full-sized avatar
🚴‍♂️
Riding my bike

Zach Hale zachhale

🚴‍♂️
Riding my bike
View GitHub Profile
@zachhale
zachhale / zerigo_to_aws_route53.rb
Created February 22, 2017 20:19 — forked from crashburn65/zerigo_to_aws_route53.rb
quick and dirty ruby script to copy dns from zerigo to amazon aws route 53 (route53). allows users to migrate ALL zones from zerigo over to Route53
#!/usr/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby
require 'rubygems'
require 'zerigo_dns'
require 'route53'
Zerigo::DNS::Base.user = 'username@email.com'
Zerigo::DNS::Base.api_key = 'yourkeyhere'
# iterate through all domain names
# we have
admin.resources :meals do |meal|
meal.resources :preparation_steps
meal.resources :preparation_tools, :collection => {:associate => :post},
:member => {:disassociate => :delete}
end
# i've added a "sort" method to the preparation_steps controller, and need
# to access /admin/meals/:meal_id/preparation_steps/:preparation_step_id/sort
@zachhale
zachhale / gist:54861
Created January 30, 2009 00:55 — forked from peterc/gist:33337
# SUPER DARING APP TEMPLATE 1.0
# By Peter Cooper
# Link to local copy of edge rails
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' }
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"
@zachhale
zachhale / .bashrc
Created January 15, 2009 01:49 — forked from henrik/.bashrc
Colored, w/out username
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# username@Machine ~/dev/dir[master]$ # clean working directory
# username@Machine ~/dev/dir[master*]$ # dirty working directory
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"