Skip to content

Instantly share code, notes, and snippets.

View hamzakc's full-sized avatar

Hamza Khan-Cheema hamzakc

View GitHub Profile
@paulccarey
paulccarey / cap_select_git_branch.rb
Created October 27, 2010 11:07
capistrano select git branch
set :branch do
branches=`git branch -r | sed "1 d"`.split
branches.map { | b | b.gsub!("origin/","") }
puts "What branch would you like to deploy from?"
branches.each_index do | i |
puts((i+1).to_s + ": " + branches[i])
end
@lucashungaro
lucashungaro / links.textile
Created August 14, 2010 16:36
Links de referência utilizados em minha palestra
@BrianTheCoder
BrianTheCoder / Gemfile
Created October 23, 2009 20:05
an example of full text search in postgres using datamapper
source "http://gems.github.com"
source "http://gemcutter.org"
bundle_path "gems"
gem "dm-core"
gem "dm-migrations"
gem "dm-sweatshop"
gem "data_objects"
gem "do_postgres"
module Rack
class GoogleAnalytics
TRACKING_CODE = <<-EOCODE
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("{{ID}}");