Skip to content

Instantly share code, notes, and snippets.

@zoigo
zoigo / ncdu_gen_rep.sh
Created August 10, 2017 22:51
Generate NCDU disk usage report
#!/bin/bash
# Generates compressed NCDU reports
DATE=$(date +”%d-%m-%Y”)
nice -n15 ncdu -qxo- / | gzip > /tmp/disk_report-${DATE}.gz
@zoigo
zoigo / YouTube_FullWindow_Video_Bookmarklet.js
Last active August 10, 2017 23:45
makes current video full window (not fullscreen, that's F11), preserves time, tested with Chrome and Firefox
javascript:(function(){video=document.getElementsByClassName("video-stream")[0];video.pause();vsecs=video.currentTime;window.location=window.location.toString().replace("watch?v=","embed/")+"?autoplay=1&start="+Math.floor(vsecs);})();
/*_put_this_into_a_bookmark's_'URL'_field_*/
@zoigo
zoigo / web2py_update_git.py_workaround.sh
Created August 1, 2017 15:22
web2py upgrade git.py workaround
#!/bin/sh -ex
dl() {
[ "$FAB_HTTP_PROXY" ] && PROXY="--proxy $FAB_HTTP_PROXY"
cd $2; curl -L -f -O $PROXY $1; cd -
}
SRC=/usr/local/src
W2PPASS=turnkey
W2PROOT=/var/www/web2py