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
alias coda='open -a /Applications/Coda\ 2.app .' |
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
require 'digest/md5' | |
class String | |
def to_md5 | |
Digest::MD5.hexdigest(self) | |
end | |
end | |
# "Hello World!".to_md5 |
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
(function($) { | |
$.each_slice = function(num, things, iterator) { | |
var tmp = []; | |
$.each(things, function(index, thing) { | |
tmp.push(thing); | |
if (tmp.length >= num || (index + 1) >= things.length) { | |
iterator(tmp); | |
tmp = []; | |
} | |
}); |
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
jQuery('body').on('click', '[data-method="delete"]', function(event) { | |
event.preventDefault(); | |
var confirm_msg = jQuery(this).data('confirm'); | |
var form = jQuery('<form />').attr({ | |
method : 'POST', | |
action : jQuery(this).attr('href') | |
}); | |
NewerOlder