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
# .config/autostart/xcompmgr.desktop | |
[Desktop Entry] | |
Name=xcompmgr | |
GenericName=Light Compositor | |
Exec=xcompmgr | |
Terminal=false | |
Type=Application | |
StartupNotify=false |
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 e="emacsclient -nw" | |
# ...snip... | |
if [ ! "$(ps -ef | grep -v grep | grep "emacs --daemon")" ] | |
then | |
emacs --daemon | |
fi | |
export EDITOR="emacsclient -nw" |
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
* * * * * if [ -z "$(pgrep -fl selfspy)" ]; then notify-send -u critical "Selfspy isn't running"; fi |
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
// using http://en.wikipedia.org/wiki/Fisher-Yates_shuffle | |
function randrange(i) { | |
return Math.floor(i*Math.random()); | |
} | |
// in-place shuffle | |
function shuffle(items) { | |
var tmp; | |
var i = items.length - 1; |
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
import os | |
import sys | |
path = sys.argv[1] | |
# http://stackoverflow.com/a/943921/184159 | |
rows, columns = [int(i) for i in os.popen('stty size', 'r').read().split()] | |
dir = os.listdir(path) | |
sizes = [os.stat(d).st_size for d in dir] | |
big = max(sizes) |
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
import cv | |
cv.StartWindowThread() | |
cv.NamedWindow("hello") | |
cap = cv.CaptureFromCAM(0) | |
for i in range(100): | |
f = cv.QueryFrame(cap) |
NewerOlder