Skip to content

Instantly share code, notes, and snippets.

View gabrielmansour's full-sized avatar

Gabriel Mansour gabrielmansour

View GitHub Profile
@gabrielmansour
gabrielmansour / hack sink ship
Last active December 19, 2015 13:09 — forked from cwsaylor/gist:8511
hack sink ship
# Variation on Hashrocket's script for managing the git process
# as documented here: http://reinh.com/blog/2008/08/27/hack-and-and-ship.html
# Create shell scripts out of each of these, put them in your path (~/bin for example)
# chmod 755 them and use like this:
#
# This version of hack is totally different than Hackrockets. I feel that hack implies
# that you are getting started, not finishing up. sink is Hashrockets hack.
#
# $ hack branch_name
# Test and Implement until done
jQuery.placeholder = function() {
var p='placeholder',s='['+p+']';
$(s).live('focus',function() {
var input = $(this);
if (input.hasClass(p)) {
input.val('').removeClass(p);
}
}).live('blur', function() {
var input = $(this);
if (input.val() === '') {
# Newbie Programmer
def factorial(x)
if x == 0
return 1
else
return x * factorial(x - 1)
end
end
puts factorial(6)
puts factorial(0)