Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am dahoo on github.
  • I am danielhoffmann ( on keybase.
  • I have a public key whose fingerprint is D38C B669 E2C6 945B BE03 4091 B682 BB3F 0698 4571

To claim this, I am signing this object:

no=$1 # number of screenshots as argument
fuzz=20 # which pixels are considered equal, in %
threshold=10 # threshold, under which images are considered equal
sec=1 # interval of screenshots, also floats possible
width=1024 # width of slide
heigth=768 # height of slide
offset=335 # offset from the left
dahoo /
Created May 11, 2013 21:40
Take a screenshot every x seconds
no=$1 # number of screenshots as argument
sec=1 # interval of screenshots in seconds, also floats possible
sleep 5 # optional
s = 0
for i in $(seq $no); do
sleep $sec
s = $(($i*$sec))
echo "$s seconds of $(($no*$sec))"
import -window root image_$(seq -f %0011f $i $i | cut -d ',' -f 1).png
dahoo / dendrogram.tex
Last active August 28, 2022 23:14
Hierarchical Clustering Dendrogram in Latex
\node (a) at (-6,0) {a};
\node (b) at (-3,0) {b};
\node (c) at (-0.5,0) {c};
\node (d) at (0.5,0) {d};
\node (e) at (2,0) {e};
\node (ab) at (-4.5,3) {};
\node (cd) at (0,1) {};
\node (cde) at (1,2) {};
\node (all) at (-1.5,5) {};