mysqldump -h<host> --compatible=postgresql -u<user> -p <database_name> > /tmp/my_dump.sql
cat my_dump.sql | mysql -h<host> -u<user> -p <database_name>
git reflog \ | |
| awk '{ print $3, $NF }' \ | |
| grep "^checkout:" \ | |
| awk '{ print $2 }' \ | |
| egrep -v '^([0-9a-f]{40}|[0-9a-f]{7}$)' \ | |
| perl -ne 'print unless $a{$_}++' \ | |
| head -5 |
ruby -rbase64 -e "File.open(ARGV[0], 'r') {|file| puts Base64.encode64(file.read) }" <file> |
let g:whippet_path = '/path/to/whippet' | |
let g:ctrlp_use_caching = 0 | |
let g:whippet_exclude_paths = ".git,.svn,tmp,log,.bundle" | |
let g:ctrlp_user_command = g:whippet_path." --exclude=".g:whippet_exclude_paths | |
let g:ctrlp_match_func = { 'match': 'Whippet' } | |
function Whippet(items, str, limit, mmode, ispath, crfile, regex) | |
let cmd = g:whippet_path.' --exclude='.g:whippet_exclude_paths |
var width = 960, | |
height = 500; | |
var projection = interpolatedProjection( | |
d3.geo.orthographic() | |
.rotate([10, -10]) | |
.center([-10, 10]) | |
.scale(240) | |
.translate([width / 2, height / 2]), | |
d3.geo.equirectangular() |
The Mercator projection is available as d3.geo.mercator.
var debounce = function(fn) { | |
var timeout; | |
var debouncedFn = function() { | |
clearTimeout(timeout); | |
timeout = setTimeout(fn.apply.bind(fn, this, arguments), 500); | |
}; | |
return debouncedFn; | |
}; |