Categories
data english Hacking

Open Street Map RL Wallpaper…

The final result
The final result

We wanted to paint one wall in our vestibule to add a little more color to the room. As we could not settle on a specific color, I thought of wallpaper. And is there any better theme than OpenStreetMap Data¹?

 
The theme was settled. It had to be a map, but which tiles? I thought of the beautiful pencil drawn MapBox tiles I saw some time ago:

OpenStreetMap Pencil Tiles by MapBox
OpenStreetMap Pencil Tiles by MapBox

We wanted some redish color so I had to convert the image with ImageMagick:

1
2
$ ./colorize.sh 25 file_in.png file_out.png
$ cat colorize.sh
#!/bin/bash
# I found this script in the imagemagick formus:
# http://www.imagemagick.org/discourse-server/viewtopic.php?t=17460#p91820
# It does about the same as gimp with the colorize option.
test -z $1 && exit -1

hue=$1
sat=50
light=0
hue=`convert xc: -format "%[fx:100*$hue/360]" info:`
sat=`convert xc: -format "%[fx:2*$sat]" info:`
test=`convert xc: -format "%[fx:$light<0?0:1]" info:`
light=`convert xc: -format "%[fx:abs($light)]" info:`
if [ $test -eq 0 ]; then
fillcolor="black"
else
fillcolor="white"
fi

convert \
$2 -set colorspace RGB -colorspace gray -set colorspace sRGB \
-fill "hsl($hue%,100%,50%)" -tint 40% \
-modulate 100,$sat,100 \
-fill $fillcolor -colorize $light% $3

the result is something like this:

Categories
data english

Big Bang Theory Relationship Diagram Update…

Two years ago I did a relationship diagram based on data collected from The Big Bang Theory TV-Series. Meisterluk updated his data for the seasons 5 and 6.
Obviously I had to update my diagram, which I finally had time to do. Here it is:

Big Bang Theory Relationship Diagram

It is only based on the data regarding dating and sex. The little mistakes I found in Meisterluk’s data i corrected again and am mirroring the corrected data here.

What did I change for the new version 1.4, since the last version 1.3 from 2011? I moved the names into the circles to keep it more compact. I changed the position of the timeline and moved some characters around for readability.
The basic concept is the same as in v 1.3. Characters that share the same length and color line on the radial timeline in the same radial distance have a relationship (date/sex). That’s it.
One can clearly see that Leonard and Penny have an on-and-off relationship. Which they finally pick up again in season 5. Sheldon and Amy, and Howard and Bernadette have the two stable relationships in the group. Their relationships go on for almost 3 seasons now.
Raj seems almost asexual if one compares his timeline. He has only one sexual encounter per season. I did not count the ‘dating’ Raj did with Siri as it is a computer voice. At the end of season 6 Raj finally picks up a relationship with Lucy. Let’s see where this ends in season 7.

Categories
english Life & Thoughts

Phone call disconnection reasons…

Phone Call Disconnection Reasons

done with Jake Vanderplas’s XKCDify in python and ipython notebook.

Categories
english Hardware Gadgets Software

cryptsetup and the yubikey…

i recently set up my laptop with a new install of gentoo linux. i’ve been using gentoo for years, but not on my laptop recently.

since encryption was no issue back then i had to get myself up to speed with cryptsetup and initramfs, which you can build yourself in gentoo. there is an option via genkernel to do this automatically, but where is the fun in that?

my basic setup includes two partitions. sda1 is boot, sda2 contains a crypt device, which contains the root partition and the user’s home partition in a lvm container.

this post is about cryptsetup and the method i use to swap the password for the container on every bootup with a cycling challenge response provided by the yubikey. let’s get to it!

Categories
english OnlineLife Net Webapps Software

Opening magnet links with xdg-open on a remote transmission daemon…

chromium asks for permission to open a magnet link
i posted a how to on a similar solution about one and a half years ago. this time we configure xdg-open to do the same.

note: if you are using ubuntu you might want to try the solution of the previous post. the approach discussed here was needed for a gentoo system, which comes with xdg-open part of xdg-utils.

the setup is as follows:
we have a remote server that runs transmission. the desktop system runs gnome.

the use case: we click a magnet link on the desktop system and the torrents starts downloading on the remote transmission server.

first we need to make a default application that we can hand our magnet link to:
we use the script we know from my previous post:

#!/bin/bash
test -z $1 && echo "need magnet link!
$0 <magnet link>" && exit -1

HOST=127.0.0.1 #YourRemoteHostNameOrIP
PORT=9091 #YourPort(default is 9091)
USER=User
PASS=pass

LINK="$1"
# set true if you want every torrent to be paused initially
#PAUSED="true"
PAUSED="false"
SESSID=$(curl --silent --anyauth --user $USER:$PASS "http://$HOST:$PORT/transmission/rpc" | sed 's/.*<code>//g;s/<\/code>.*//g')
curl --silent --anyauth --user $USER:$PASS --header "$SESSID" "http://$HOST:$PORT/transmission/rpc" -d "{\"method\":\"torrent-add\",\"arguments\":{\"paused\":${PAUSED},\"filename\":\"${LINK}\"}}"

put this script where you like, we will refer here to /home/user/Scripts/magnetLinkTransfer.sh, make it executable, and configure it according to your transmission setup on your remote machine. you might also need to install ‘curl’, which is used by this script.

second we need to define this new ‘application’ in /usr/share/applications/:
add the file “magnet.desktop” in the folder /usr/share/applications/ with the following content:

[Desktop Entry]
Name=Magnet
Type=Application
Comment=Open a magnet link remotly with the help of a script
Exec=/home/user/Scripts/magnetLinkTransfer.sh %U
Categories=Network;WebBrowser;
MimeType=x-scheme-handler/magnet;

lastly we need to add our new ‘application’ in “.local/share/applications/mimeapps.list”. add ‘x-scheme-handler/magnet=magnet.desktop’ to the default applications in that file, like this:

[Default Applications]
# there might be more other default applications defined, leave them unchanged.
x-scheme-handler/magnet=magnet.desktop

that should be it! now when you click a link in your browser it should either work, or ask you if it is ok to start “xdg-open magnet:…”, as seen in the picture. you may set the check box to avoid future confirmations.

Categories
english Hacking Software

Integrating android devices into the torrent landscape…

Transdroid Screenshot on ICS (Android 4.0)
i’m using bittorrent for downloading. more precisely the transmission daemon on my home server for the heavy lifting (downloading torrents). to administer the downloads the web frontend is perfect. in the background runs the transmission daemon which handles the torrents and accepts requests of all sorts of clients. you can even pass magnet links you clicked, from your desktop to the remote daemon with a little hacking.

To get the same comfort for your android device (phone or tablet), you need an app. i’m using transdroid, which currently is NOT available in the google play store (former android market). get the latest transdroid apk here.

Transdroid download link
Before you install transdroid you might want to read a little about the app on the transdroid website. Further you need to allow apps from ‘unknown sources’ in your android settings. Download the app via the link above or the QR-code (get a qr-code reader here).

Categories
english OnlineLife Net Webapps Software

word clouds in java script…

i’ve been waiting for this since i first used wordle. wordle was great. it has a great design and is easy to use, but the java plugin mess was horrible. it worked unter mac os x but linux support is just not there when you want to export a word cloud as vector graphic.

now jason davies did a similar thing but in java script; it’s open source and on github. thank you jason! your effort is very much appreciated 🙂

greets from graz:

via flowingdata.com.