fredag 29 januari 2010

Google earth, localization and decimal point

I ran into a bug with google earth, which refused to show my kml files properly.
My curves had been straightened out and data were missing.
This is because the decimal point notation is not respected when parsing kml files - my Swedish localization thinks decimal points are a comma (,) and not point (.).

This is a workaround:
start google earth with LANG set to something else.
$LANG= googleearth


For me, this bug appears on google earth 5.1.3506.3999 (beta) but not 5.0.11377.1968 (beta). Now these two run on different systems, but anyway....


Sorry for not having time to dig the bug archives etc. Post links if you know any relevant links for this bug.

I have not seen anything about decimal points in the kml specification. If you see it somewhere, please post a link.

And while I am at it: Thanks google (and/or Keyhole?), for distributing this fantastic piece of software.

lördag 23 januari 2010

Kommentarer på youtube

Den här serien är rätt talande, tycker jag...

xkcd 481

Universum

En resa genom universum. Det är långt mellan planeterna!

Spamkommentarer

Jag har börjat få fler och fler spamkommentarer på bloggen. Jag har tröttnat på att gå in och ta bort dom, så nu har jag aktiverat att jag måste godkänna kommentarer.
Det är så att man undrar vem som har tid att sitta och skriva kommentarer överallt.

torsdag 21 januari 2010

Musiktips

Vilket ös!
New World Symphony av Earth, wind and fire.

http://open.spotify.com/track/1RqwrjfM6mmh2vgBzNNYJU

Slumpmässig information 4

Ordet queueing har fem vokaler i rad.

(Här fanns fler lustiga saker i engelska språket: askoxford)

fredag 15 januari 2010

Energiförbrukning för akvarium

Jag lånade ut min elenergimätare till en bekant, med villkor att han delade med sig av resultatet. Han har nu mätt upp sitt 1m³(!) saltvattenakvarium och fler andra grejer.

Akvariet drar alltså bortåt 900 W!



Standby
Elförbrukning Beskrivning W W
Big Pump Cirkulationspump sump-akvarium, 14m tryck 100
UV pump
39
UV light
28
Calcium reactor 2000 liter 30
Heater 2st - 1st i backup standbyläge 190 13
Skimmer 1500 liter 37
Cirk pump 2st mellan kammare 12
Refill pump 2min/dygn 22
Streamer 3st 67
Moon light Endast nattdrift 4
Big light Dimbar 250 - 415Watt, 6 timmar/dygn 310
T5 Blue light Ej nattdrift 50
T5 White Ej nattdrift 50

Summa: 939

Övriga saker:

Standby
Elförbrukning Beskrivning W W
Julljus 4 ljusstakar, seriekopplade 90
Julljus 3 ljusstakar, seriekopplade 75
Textilgranar Bordsdekor 30
Utelampor Lågenergi, 3-11watt/st 260
Projektor 150 9
Surround 38 0
PS3 135 10

Slumpmässig information 3

Det går numera att skapa länkar under windows.
NTFS mjuka länkar
.

torsdag 14 januari 2010

Tack Google

Jag ställer mig i raden av gratulanter till Google som nu inte längre infinner sig i att medverka till den kinesiska censuren.
Googles blogginlägg om saken(engelska)
Ett mer utförligt utlägg (på svenska)
Förhoppningsvis leder detta på sikt till att censuren kan luckras upp.

lördag 9 januari 2010

Så funkar det - universum

Det här föredraget handlar om hur universum fungerar. Sevärt! En timme underhållning :-)

torsdag 7 januari 2010

Smokeping on debian lenny

Smokeping is a tool to monitor network connectivity and visualize it in a very easily readable way.
I had some trouble to get it started - not the smokeping part, but getting the apache configuration going. This is a writeup on what I did to get it going. It is used on Debian Lenny, but should work for ubuntu as well. To lighten up the text, I show one of the graphs I got from it. I can see there was a network disruption for approximtely 20 minutes.

I wrote this by following the material on

Install smokeping:
apt-get install smokeping


(optional)
Configure the interval in /etc/smokeping/config.d/Database as the default values are, in my opinion, a bit to sparse to detect network loss.
step = 30
pings = 3


Delete the statistics database to avoid the error during restart in the next step:
rm /var/lib/smokeping/Local/LocalMachine.rrd


restart smokeping:
/etc/init.d/smokeping restart


add targets in /etc/smokeping/config.d/Targets:
+ dreik
menu=dreik
title=dreik
++ sniiigel
menu=sniiigel
title=sniiigel
host=sniiigel.dreik.se

++ rufus
menu=rufus
title=rufus
host=rufus.paulsundvall.net


restart smokeping to make it start monitoring the newly added entries above (this lets you have some statistics to view, collected while getting the rest to work):
/etc/init.d/smokeping restart


Smokeping should now be running. To be able to see some results you have to run a web server with cgi capabilities. I believe one can generate the content statically instead and serve it as static pages, but I use apache/cgi here.

(Install apache if you have not done already. apt-get install apache2)

One has to edit an existing or create a new apache configuration file. I serve the stats through password protected pages on ssl, this is an excerpt from that file which is /etc/apache2/sites-available/ssl. If you do not care about encryptiong and/or protecting the page, you can set it up using a much shorter configuration file. Just leave out the bits about authentication.
I do not know much about apache configuration and the configuration could probably be improved while obtaining the same or higher security level.

Alias /smokeping/ /var/www/smokeping/

Options -FollowSymLinks
Options -Indexes
AllowOverride None
AuthUserFile /x/y/z/passwords
AuthGroupFile /x/y/z/groups
AuthName "bla da bla smokeping"
AuthType Basic
AuthBasicProvider file
Require group webreaders

Alias /smokepingcgi/ /usr/lib/cgi-bin/

Options +ExecCGI
AddHandler cgi-script cgi
SetHandler cgi-script
Options -FollowSymLinks
Options -Indexes
AllowOverride None
AuthUserFile /x/y/z/passwords
AuthGroupFile /x/y/z/groups
AuthName "bla da bla smokeping"
AuthType Basic
AuthBasicProvider file
Require group webreaders



Then reload the apache configuration with
/etc/init.d/apache2 reload


And voila, I get nice graphs when pointing the browser to the www.myserver.net/smokepingcgi/smokeping.cgi

To get the name right, edit /etc/smokeping/config.d/General to contain your name instead of the default.