(from a scratch install). Kinda, I imported my user home (~) from a Time Machine backup.
sudo mkdir /usr/local
sudo chown -R `whoami` /usr/local
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local
#!/usr/bin/env bash | |
# | |
# install all of http://github.com/phuibonhoa's TM bundles (OS X only) | |
# | |
echo "Installing bundles..." | |
# backup dir | |
if [ -d ~/desktop/_tm_bundle_backups ]; then rm -rf ~/desktop/_tm_bundle_backups; fi |
# This is until there is a nested_has_many_through solution for Rails 3 | |
# to let us do something like: | |
# | |
# has_many :interests, :through => :users, :select => "DISTINCT tags.*", | |
# :class_name => "ActsAsTaggableOn::Tag" | |
def interests | |
ActsAsTaggableOn::Tag. | |
select("DISTINCT tags.*").joins(:taggings). | |
where("taggings.context" => "interests"). | |
where("taggings.taggable_type" => "User"). |
# Run with this: | |
# $ curl "https://gist.github.com/raw/748530/5e74315dc6b6fe572f8a457536ad7eb17ad3f1e4/a.rb" > a.rb; while true; do clear; ruby a.rb | tee b.rb; sleep 0.3; mv -f b.rb a.rb; done | |
# Source: http://mamememo.blogspot.com/2010/09/qlobe.html | |
v=0000;eval$s=%q~d=%!^Lcf<LK8, _@7gj*LJ=c5nM)Tp1g0%Xv.,S[<>YoP | |
4ZojjV)O>qIH1/n[|2yE[>:ieC "%.#% :::##" 97N-A&Kj_K_><wS5rtWk@*a+Y5 | |
yH?b[F^e7C/56j|pmRe+:)B "##% ::##########" O98(Zh)'Iof*nm.,$C5Nyt= | |
PPu01Avw^<IiQ=5$'D-y? "##: ###############" g6`YT+qLw9k^ch|K'),tc | |
6ygIL8xI#LNz3v}T=4W "# #. .####:#######" lL27FZ0ij)7TQCI)P7u | |
}RT5-iJbbG5P-DHB<. " ##### # :############" R,YvZ_rnv6ky-G+4U' |
When /^I eval: (.*)$/ do |ruby| | |
p eval(ruby) | |
end | |
When /^I wait for (\d+) (second|minute)s?$/ do |count, period| | |
sleep count.to_i.send(period) | |
end | |
When /^I pause$/ do | |
print "Press [Enter] to continue" |
First install the required gems:
gem install octokit awesomeprint rainbow
Then run it to extract all of your open GitHub issues into files (with comments).
ruby my-gh-issues.rb
class Api::RegistrationsController < Api::BaseController | |
respond_to :json | |
def create | |
user = User.new(params[:user]) | |
if user.save | |
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
return | |
else |
## Prepare ################################################################### | |
# Remove RVM | |
rvm implode | |
# Ensure your homebrew is working properly and up to date | |
brew doctor | |
brew update | |
## Install ################################################################### |
$ brew install https://raw.github.com/paulnicholson/homebrew/master/Library/Formula/stud.rb
$ curl https://gist.githubusercontent.com/paulnicholson/2050941/raw/7e4d2178e3733bed18fdfe737277c3cb72241d39/powssl > ~/bin/powssl
$ chmod +x ~/bin/powssl
$ powssl
class InviteCode < ActiveRecord::Base | |
validate :invite_code, :presence => true | |
def to_s | |
invite_code | |
end | |
def self.generate | |
8.times.map { [*?a..?z,*?A..?Z].sample }.join | |
end |