- Install pry.
gem install pry
- Require pry at the top of whatever Ruby file to want to launch it from.
require 'pry'
gem install pry
require 'pry'
#!/bin/bash | |
# Updates Bower packages and reinstalls latest versions of Bootswatch themes | |
function bootswatch { | |
pushd components/bootstrap.css/css > /dev/null | |
for theme in $*; do | |
echo "Downloading $theme theme" | |
curl http://bootswatch.com/$theme/bootstrap.css -so bootstrap-$theme.css | |
curl http://bootswatch.com/$theme/bootstrap.min.css -so bootstrap-$theme.min.css | |
done |
# Fix Dropbox
fs.inotify.max_user_watches = 100000
(1..100).each { |i| puts((i%3==0 ? "Fizz" : "") + (i%5==0 ? "Buzz" : "") + ((i%3!=0 and i%5!=0) ? i.to_s : "")) } |
// see http://blog.jquery.com/2011/11/03/jquery-1-7-released/ | |
$('a').bind('click', myHandler); | |
$('a').on('click', myHandler); | |
$('form').bind('submit', { val: 42 }, fn); | |
$('form').on('submit', { val: 42 }, fn); | |
$(window).unbind('scroll.myPlugin'); | |
$(window).off('scroll.myPlugin'); |
require 'octokit' | |
require 'colorize' | |
def create_logged_in_client | |
puts 'Logging into GitHub. Don\'t worry, I won\'t save your credentials.' | |
print 'GitHub username: ' | |
username = $stdin.gets.strip | |
print 'GitHub password: ' | |
password = begin | |
`stty -echo` rescue nil |
git stash
to save away unrelated changes before you commit.--patch
. It can be very useful, though it also makes it easier to commit portions of your changes that you haven't tested without the rest of your changes.