Skip to content

Instantly share code, notes, and snippets.

Casey Watson watsoncj

Block or report user

Report or block watsoncj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jowl
jowl / gitshot
Created Sep 17, 2012
Take photo automatically after every git commit. Run `gitshot --enable` in project base dir to enable.
View gitshot
#!/usr/bin/env ruby
require 'fileutils'
APP = __FILE__.split('/').last
pwd = Dir.pwd
if ARGV.include? '--enable'
post_commit = File.join(pwd,'.git/hooks/post-commit')
abort('post commit hook already exist!') if File.exists?(post_commit)
@daveaugustine
daveaugustine / Inside_your_router.coffee
Created Feb 8, 2012
Super simple Google Analytics page tracking with backbone
View Inside_your_router.coffee
initialize: ->
@bind 'all', @_trackPageview
_trackPageview: ->
url = Backbone.history.getFragment()
_gaq.push(['_trackPageview', "/#{url}"])
@jsmpereira
jsmpereira / gist:1094024
Created Jul 19, 2011
Padrino pagination
View gist:1094024
#
# Adapted from http://pastebin.com/FL5KeQQH
#
# As mentioned on the link above put this on app/helpers/pagination.rb
# and you can use in your view
#
# =will_paginate @posts
#
# I'm also using this https://gist.github.com/837683
#
@briandealwis
briandealwis / gist:782862
Created Jan 17, 2011 — forked from spullara/gist:782523
One-liner to turn jar with Main-Class into executable shell script
View gist:782862
# turn a jar with a Main-Class into a stand alone executable
(echo '#!/usr/bin/env java -jar'; cat blahblah.jar) > blah
# turn a jar with a particular main clas into a stand alone executable
(echo '#!/usr/bin/env java -jar package.MainClass'; cat blahblah.jar) > blah
You can’t perform that action at this time.