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
english Hacking OnlineLife Net Webapps

How to open magnet links on a remote transmission daemon with one click…

i’m using transmission for my regular bittorrent needs. it has a nice simple interface and can even be run as a daemon on a server. therefor it even offers a nice looking web interface.

Note: if you are running gentoo or a system that uses the xdg-utils with xdg-open, you might want to look at this howto.

since my working machine is not always running but my server is, this is where transmission is set up.

Transmission Web Interface

the web interface provides a nice mask to setup your torrents. you can upload a .torrent file (to your remote machine) or just an URL of a torrent or most recently a magnet link. this is very handy since you don’t need to handle any .torrent files locally. just copy that link and you are done.

when you are running a torrent client directly on the machine you pick out your torrents clicking on the magnet link will most likely start the download immediately without having to copy that link. this kind of comfort was missing with the remote version of transmission.

so i hacked around to solve that.