Skip to content

Instantly share code, notes, and snippets.

@flyser
flyser / makemkv.sh
Last active August 29, 2015 13:57 — forked from powerswitch/makemkv.sh
#!/bin/sh
if [[ "x$1" = "x" ]]; then
echo "Usage:"
echo " $0 <searchpath>"
exit 1
fi
find "$(readlink -f "$1")" -type d -name STREAM | while read M ; do
cd "$M"
@flyser
flyser / gist:6183740
Last active December 20, 2015 19:29 — forked from anonymous/gist:6183623
## This is on python 2.7:
In [1]: a = '12345678'
In [2]: %timeit [a[max(i-3,0):i] for i in range(len(a), 0, -3)][::-1]
1000000 loops, best of 3: 1.91 us per loop
In [3]: %timeit format(int(a), ',').split(',')
1000000 loops, best of 3: 1.62 us per loop
@flyser
flyser / stdin.txt
Created June 13, 2012 22:44 — forked from anonymous/stdin.txt
stdin
diff --git a/cournal-server.py b/cournal-server.py
index 75cf46a..44c99cd 100755
--- a/cournal-server.py
+++ b/cournal-server.py
@@ -41,12 +41,14 @@ USERNAME = "test"
PASSWORD = "testpw"
class Page:
+ """
+ A page in a document, having multiple strokes.