Automatisera belysningen

Jag har sedan en tid tillbaka funderat på hur man kan automatisera belysningen i lägenheten. Egentligen borde det inte vara så svårt, tekniken finns ju redan och är busenkel. Efter lite experiment visade det sig också vara fallet – det är enkelt.

Unix commands


mysqldump

Usage: mysqldump -u -p [OPTION] [database]

Setup Tellstick on a Raspberry Pi

Install Raspbian by downloading the image from http://www.raspberrypi.org/downloads/ and run:

# Replace diskn with your disk, you can find it by: diskutil list
$ diskutil unmountDisk /dev/diskn
$ sudo dd bs=1m if=path_of_your_image.img of=/dev/diskn

Setup Python

If you are using Pythin < 3.3, install virtualenv and virtualenvwrapper.

# virtualenvwrapper lists virtualenv as a dependency, so it's automatically installed
$ sudo pip install virtualenvwrapper

iTerm2 jump between words

To jump between words and start/end of line in iTerm2 follow these steps:

Backup raspberry pi image

Creating a disk image will preserve not only files but also the filesystem structure and when you decide to flash your new SD card, you will be able to just plug it in and it will work.

Setup ubuntu server

A few, initial, steps to setup a ubuntu (14.04) server.