Skip to content

Instantly share code, notes, and snippets.

View osheroff's full-sized avatar

Ben Osheroff osheroff

View GitHub Profile
@osheroff
osheroff / git-prodtag
Created May 11, 2011 19:01
git-prodtag
#!/bin/bash
if [[ `git branch | grep '*' | awk '{print $2}'` != 'production' ]] ; then
echo "Only on checked out production branch, plz"
exit
fi
git fetch --tags origin
RUBY=$(cat <<endruby
require 'pp'
tags = []
def verification_link(account, user)
token = user.identities.first.verification_tokens.first || user.identities.first.verification_tokens.create
link = "#{account.url(:mapped => false)}/verification/email/#{token.value}"
end
account = nil
ActiveRecord::Base.on_shard(2) do
account = Account.new(:name => "Number Four", :size => 1, :time_zone => "Copenhagen") { |a|
a.subdomain = "shardly#{rand(150)}"
a.help_desk_size = "5-20"