Skip to content

Instantly share code, notes, and snippets.

@joshdvir
joshdvir / rename_rhtml.rb
Created June 20, 2011 11:02
bulk renaming rhtml files and doing a git mv
Dir.glob('app/views/**/*.rhtml').each do |file|
puts `git mv #{file} #{file.gsub(/\.rhtml$/, '.erb')}`
end
@joshdvir
joshdvir / Links to articles
Created July 27, 2011 19:23
Switching to Capybara from Webrat + configuring a headless firefox with selenium
@joshdvir
joshdvir / gist:1112232
Created July 28, 2011 18:49
Git bash aliases for .bash_profile and .bashrc
# git
alias gl='git pull'
alias gp='git push'
alias gpom='git push origin master'
alias gpos='git push origin staging'
alias push='git co master ; git push origin master ; git co develop ; git push origin develop'
alias pull='git co master ; git pull origin master ; git co develop ; git pull origin develop'
alias gd='git diff'
alias gc='git commit'
alias gca='git commit -a'
@joshdvir
joshdvir / gist:1112265
Created July 28, 2011 19:00
Mercurial (hg) bash aliases for .bash_profile and .bashrc
# mercurial (hg)
alias hl='hg pull'
alias hp='hg push'
alias hd='hg diff'
alias hc='hg commit'
alias hco='hg checkout'
alias hb='hg branch'
alias hs='hg status'
alias ha='hg add .'
@joshdvir
joshdvir / gist:1112660
Created July 28, 2011 21:45 — forked from Gregg/gist:968534
Code School Screencasting Framework

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this screencast if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent then a phone call or screen sharing.
@joshdvir
joshdvir / gist:1116728
Created July 31, 2011 11:48
How to install Guard + Guard Cucumber + Guard Spork
@joshdvir
joshdvir / gist:1203110
Created September 8, 2011 10:34
Install ruby 1.8.7 on OSX Lion + Mysql Gem
Decided to get started using RVM on my Mac, unfortunately, right before continuing development on an otherwise sturdy app.
Upon start-up, there were errors in the log starting with
/!\ FAILSAFE /!\ Sat Dec 11 17:17:47 -0600 2010
Status: 500 Internal Server Error
uninitialized constant MysqlCompat::MysqlRes
/Users/username/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:440:in `load_missing_constant'
/Users/username/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in `const_missing'
@joshdvir
joshdvir / gist:1321758
Created October 28, 2011 06:41
Creating a larger EBS system from an AMI
Commands to create larger EBS filesystem then came:
First choose your AMI - you should know that.
# check information on you AMI like size of root mount.
ec2-describe-images <ami-xxxxxxxx>
# Start a new server based on the ami with a 30GB size root mount
ec2-run-instances --key <KEY RING NAME> --block-device-mapping /dev/sda1=:30 <ami-xxxxxxxx>
@joshdvir
joshdvir / SSH_Key
Created November 19, 2011 05:32
Create Public/Private SSH Key
There are 2 commands to generate the SSH key, one creates a RSA encryption and the other creates a DSA encryption:
RSA:
ssh-keygen -t rsa
DSA:
ssh-keygen -t dsa
@joshdvir
joshdvir / delete_orig.rb
Created March 5, 2012 15:30
Delete orig files created from git merge
Dir.glob('./**/*.orig') do |file|
File.delete(file)
end