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
| import cv | |
| cv.StartWindowThread() | |
| cv.NamedWindow("hello") | |
| cap = cv.CaptureFromCAM(0) | |
| for i in range(100): | |
| f = cv.QueryFrame(cap) |
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
| 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 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
| // 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 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
| * * * * * if [ -z "$(pgrep -fl selfspy)" ]; then notify-send -u critical "Selfspy isn't running"; fi |
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
| 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 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
| # .config/autostart/xcompmgr.desktop | |
| [Desktop Entry] | |
| Name=xcompmgr | |
| GenericName=Light Compositor | |
| Exec=xcompmgr | |
| Terminal=false | |
| Type=Application | |
| StartupNotify=false |
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
| #!/bin/sh | |
| if [ -z "$(pgrep -fl selfspy)" ] | |
| then | |
| DISPLAY=:0.0 notify-send -u critical "Selfspy isn't running"; | |
| fi |
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/python | |
| import time | |
| import base64 | |
| import hashlib | |
| hash_out = base64.urlsafe_b64encode(hashlib.md5(str(time.time())).digest()) | |
| print hash_out[:-2].replace('-', ',').replace('_', '.') |
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
| svn log | grep "^r[[:digit:]]\{4\}" | cut -f 3 -d " " | sort | uniq |
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 python | |
| import os | |
| import time | |
| import random | |
| rows, columns = os.popen('stty size', 'r').read().split() | |
| columns = int(columns) | |
| middle = columns/2 |
OlderNewer