Jul 112014

With Python Standard Library Methods


from struct import pack
from math import sin, pi
import wave
import random


wv = wave.open('test_mono.wav', 'w')
wv.setparams((1, 2, RATE, 0, 'NONE', 'not compressed'))
maxVol=2**15-1.0 #maximum amplitude
for i in range(0, RATE*3):
   wvData+=pack('h', round(maxVol*sin(i*2*pi*500.0/RATE))) #500Hz

wv = wave.open('test_stereo.wav', 'w')
wv.setparams((2, 2, RATE, 0, 'NONE', 'not compressed'))
maxVol=2**15-1.0 #maximum amplitude
for i in range(0, RATE*3):
   wvData+=pack('h', round(maxVol*sin(i*2*pi*500.0/RATE))) #500Hz left
   wvData+=pack('h', round(maxVol*sin(i*2*pi*200.0/RATE))) #200Hz right

With scikits.audiolab


VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Jul 042014

Alain Kelder mentioned this command employing mencoder in his blog post (see resources section):

mencoder -fps 60 -nosound -ovc copy $MOVIE -o $(basename -s .mp4 $MOVIE)_60p_no-re-enc.mp4


Or use MP4Box if it’s available for your platform:

# http://askubuntu.com/a/370826/6326
MP4Box -add source.mp4#video -raw 1 -new test
# Then save it as an MP4 again:
MP4Box -add test_track1.h264:fps=30 -new dest.mp4). You

(Alternative) Commands that DO re-encoding

If you are OK with re-encoding, however, you can also use ffmpeg:

ffmpeg -i $(basename -s .h264 $MOVIE).mp4 -r 60 -filter:v "setpts=(1/20)*PTS" $(basename -s .h264 $MOVIE)_60p_re-enc.mp4

assuming the input file has a framerate of 3 fps and the one to write should have 60 fps (thus speedup = 60/3 = 20).

Jun 272014
from ipaddress import IPv4Network, IPv6Network

a = IPv4Network('')
b = IPv4Network('')
c = IPv4Network('')

x = IPv6Network('2000::/64')
y = IPv6Network('2000:0:0:1::/64')
z = IPv6Network('::1')

# -> https://gist.github.com/pklaus/8f702a6042f8f3fcf7e7
from iphelpers import optimize

nets = [a, b, c]
nets = optimize(nets)
# -> [IPv4Network(''), IPv4Network('')]

netsv6 = [x, y, z]
netsv6 = optimize(netsv6)
# -> [IPv6Network('::1/128'), IPv6Network('2000::/63')]


VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Jun 262014

Kann direkt aus dem Browser gedruckt werden (bei 100%):

“Arbeitsblatt für die Tagesplanung”

(Nicht vergessen, beim Drucken einzustellen, dass keine URL, Datum etc. auf den Ausdruck kommen soll.)


Einige gedankliche Anstöße für die Art, das Blatt in HTML und CSS umzusetzen, habe ich aus dieser Vorlage für eine Rechnungserstellung in HTML entnommen: The HTML5 Invoice (2012-06-25). (Auch als html5-invoice auf Github zu finden.)

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Jun 242014

Printing with CUPS

sudo pacman -S cups gutenprint
sudo systemctl enable cups
sudo systemctl start cups

Go to http://localhost:631 and add printer as root

before that I installed cups-bjnp from AUR. don’t know if needed…

Scanning with Sane

Support is decent according to Sane:

Model Interface USB id Status Comment
PIXMA MP970 USB Ethernet 0x04a9/0×1726 complete All resolutions supported (up to 4800DPI). Full TPU support (negative and slides) at 24 or 48 bits.
pacman -S xsane

scanimage -L reports:

device `pixma:MP970_192.168.178.130' is a CANON Canon Pixma MP970 multi-function peripheral

./bjnp from cups-bjnp reports:

Jun 172014

This blog post is still in the makes, you can, however, already take advantage of the pretty content available so far.

  1. Install Arch Linux ARM on SD Card (get the image from here)
  2. Plug SD card into RPi, connect the Camera Module (see this) and power up the RPi
  3. SSH into the RPi with user/pw root/root (find the IP of your Raspi with sudo nmap -sP | awk '/^Nmap/{ip=$NF}/B8:27:EB/{print ip}').
  4. Change the root password with passwd
  5. Bring system up-to-date and install some important tools with pacman -Syyu vim htop screen
Jun 072014

As soon as the device is powered on, it starts recording your track. The tracks are then stored GPX files in the Tracks folder.

Using OSM Maps

http://maps4me.net/ (costs money)

With software version 2.15, you can use OSM maps but you should replace the basemap first.



as found on the product web page:

  • Seamless Connection to Geocaching.com User Community – Easily connect to the #1 user community for geocaching and perform “Send to GPS”, create and sync Pocket Queries, and upload Field Notes
Jun 062014

Source: http://en.wikipedia.org/wiki/Spelling_alphabet

Letter NATO French Deutsch
A Alpha Anatole Anton
Ä - - Ärger
B Bravo Berthe Berta
C Charlie Célestin Cäsar
Ch - - Charlotte
D Delta Désiré Dora
E Echo Eugène Emil
F Foxtrot François Friedrich
G Golf Gaston Gustav
H Hotel Henri Heinrich
I India Irma Ida
J Juliett Joseph Julius
K Kilo Kléber Kaufmann
L Lima Louis Ludwig
M Mike Marcel Martha
Jun 052014

I wrote this post for myself as a reference when I bought the projector. However, I returned my W750 to Amazon for two reasons: It made a nasty high frequency noise when plugged in to the power mains (while being powered off) and the rainbow effect of the DLP technology was disturbing me too much while watching the first movie with the projector.

Projection Geometry

My projection canvas is 90 cm x 160 cm big and thus has a diagonal of 183 cm (or 72 inch).