Skip to content

Instantly share code, notes, and snippets.

View kristjan's full-sized avatar

Kristján Pétursson kristjan

View GitHub Profile
@beaugunderson
beaugunderson / gist:2054996
Created March 17, 2012 04:41
Human-readable long epoch dates in vim
" Human-readable long epoch dates (long meaning those that include milliseconds)
function! DateFromLongEpoch()
" Let the shell divide because vim only supports 32 bit ints
let sdate=system("echo $((". expand("<cword>") ."/1000))")
" Format the date
let human=tolower(substitute(strftime("%m/%d/%y %I:%M:%S%p", sdate), "\\\<0", "", "g"))
return human ." (". (sdate - localtime()) ." seconds from now)"
endfunc
@tmm1
tmm1 / README.md
Created February 10, 2011 05:33
no longer requires any proxies! just replace your enhancers.js. also see https://gist.github.com/821736