This file contains hidden or 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 sh | |
echo "data:$(file -b --mime-type "$1");base64,$(base64 "$1")" |
This file contains hidden or 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
/* Simplified version of http://www.useragentman.com/blog/2010/10/29/cross-browser-html5-ruby-annotations-using-css/ | |
for use with Modernizr.load() */ | |
ruby { | |
display: inline-table; | |
text-align: center; | |
border-collapse: collapse; | |
border: none; | |
vertical-align: middle; | |
border-bottom: solid 0.75em transparent; |
This file contains hidden or 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 | |
begin | |
response = %x{ curl -u username:password --silent "https://mail.google.com/mail/feed/atom" } | |
fullcount = response.match(/<fullcount>(\d+)<\/fullcount>/)[1].to_i | |
message = fullcount > 0 ? fullcount.to_s + " new message(s)." : "No new messages." | |
rescue | |
message = "There was an error." | |
ensure | |
%x{ growlnotify "#{message}" -m "" --image "icon.png" } |
This file contains hidden or 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
autocmd BufNewFile,BufRead * | |
\ if expand('%:~') =~ '^\~/Dropbox' | | |
\ set noswapfile | | |
\ else | | |
\ set swapfile | | |
\ endif |
This file contains hidden or 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($) { | |
$.fn.viewportPosition = function() { | |
var a = this, b = a.offset().top - $(window).scrollTop(), c = a.offset().left - $(window).scrollLeft(); | |
return {top: b, left: c}; | |
}; | |
})(jQuery); |
NewerOlder