This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
initialize: -> | |
@bind 'all', @_trackPageview | |
_trackPageview: -> | |
url = Backbone.history.getFragment() | |
_gaq.push(['_trackPageview', "/#{url}"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
NewerOlder