<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>epepep</title>
	<atom:link href="http://per.liedman.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://per.liedman.net</link>
	<description></description>
	<lastBuildDate>Wed, 28 Dec 2011 11:11:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Using Ubuntu One from a headless Oneiric Ocelot server</title>
		<link>http://per.liedman.net/2011/12/28/using-ubuntu-one-from-a-headless-oneiric-ocelot/</link>
		<comments>http://per.liedman.net/2011/12/28/using-ubuntu-one-from-a-headless-oneiric-ocelot/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 11:08:41 +0000</pubDate>
		<dc:creator>Per Liedman</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://per.liedman.net/?p=248</guid>
		<description><![CDATA[I discovered my backup has been broken since august. Yikes. I don&#8217;t know the whole story why it started failing, but apparently it became permanently broken after updating to Ubuntu 11.10, Oneiric Ocelot. I use Ubuntu One for my backup, since I&#8217;m a cheap bastard. The way I set it up is described here: Using [...]]]></description>
			<content:encoded><![CDATA[<p>I discovered my backup has been broken since august. Yikes. I don&#8217;t know the whole story why it started failing, but apparently it became permanently broken after updating to Ubuntu 11.10, Oneiric Ocelot. I use Ubuntu One for my backup, since I&#8217;m a cheap bastard. The way I set it up is described here: <a href="http://per.liedman.net/2011/01/22/using-ubuntu-one-for-backup-on-a-headless-server/">Using Ubuntu One for backup on a headless server</a>. Unfortunately, the package <i>ubuntuone-client-tools</i> has been removed in Oneiric Ocelot, which was pretty much a disaster for my backup. Since my old blog post still appears to be the number one Google result for backing up to Ubuntu One from the command line, I sort of feel obliged to tell you how to set it up in Oneiric Ocelot as well.</p>
<h2>Setting up <i>u1sync</i> in Ubuntu 11.10, Oneiric Ocelot</h2>
<p>Maybe I&#8217;m just dumb or something, but I was sort of shocked of how hard it was to find any information at all about what had happened to the <i>u1sync</i> utility or why the package <i>ubuntuone-client-tools</i> had been removed. At last, I found that <a href="https://launchpad.net/u1sync">u1sync is now hosted on Launchpad</a> &#8211; it doesn&#8217;t appear to be part of any package, there doesn&#8217;t appear to be any documentation, there isn&#8217;t even a downloadable file. You can get the latest code (no tags or branches or anything fancy here) using <a href="http://bazaar.canonical.com/en/">Bazaar</a>, the VCS that isn&#8217;t popular anywhere. Sorry to be sarcastic, but it&#8217;s pretty much the caricature of an open source project. On the bright side: the code is there, someone has made this utility and is sort of maintaining it &#8211; I love you for doing this!</p>
<p>So, to get u1sync on your machine:</p>
<ol>
<li>Install Bazaar:<br />
    <code>sudo apt-get install bzr</code>
  </li>
<li>Download the latest code to your working directory:<br />
    <code>bzr branch lp:u1sync</code>
  </li>
<li>Install the code:<br />
<code>    cd u1sync<br />
    sudo python setup.py install<br />
</code>  </li>
</ol>
<p>&#8230;and we are more or less back to where we left off in my previous blog post. One minor issue: if you used the u1sync utility from the old package, you might get the error message:<br />
<code> ImportError: No module named u1sync.genericmerge</code><br />
when running u1sync. In this case, you have an old file called <code>.ubuntuone-sync/local-index</code> in your synced folder &#8211; open the file and find the text <code>ubuntuone.u1sync.genericmerge</code> &#8211; remove the first part, so that only <code>u1sync.genericmerge</code> is left. (Yes, yikes! I spent a good part of a day swearing over this.)</p>
<h2>Getting an authorization token for Ubuntu One using command line</h2>
<p>A lot of the comments on my earlier blog post revolved around the fact that I reused the oauth token from my desktop machine when doing the backup from my server. That was an imperfect solution which resulted in file conflicts and other issues. On the other hand, not even Stuart Langridge, Technical architect for Ubuntu One, could post correct instructions on getting a new token from the command line <img src='http://per.liedman.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>After digging in to this a bit more, writing some code of my own to do it, I finally found that of course someone else already did it. <a href="http://people.canonical.com/~roman.yepishev/">Roman Yepishev</a> wrote a small <a href="http://people.canonical.com/~roman.yepishev/us/ubuntuone-sso-login.py">script to create a new oauth token for Ubuntu One</a> &#8211; it&#8217;s pretty self instructive if you use it. It dumps the new token to stdout, and you stick it into the u1sync commandline. Exactly what I wanted.</p>
<p>Hope this was helpful in getting Ubuntu One from the command line set up for you!</p>
]]></content:encoded>
			<wfw:commentRss>http://per.liedman.net/2011/12/28/using-ubuntu-one-from-a-headless-oneiric-ocelot/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>What Plane 1.1.1</title>
		<link>http://per.liedman.net/2011/06/09/what-plane-1-1-1/</link>
		<comments>http://per.liedman.net/2011/06/09/what-plane-1-1-1/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 21:16:30 +0000</pubDate>
		<dc:creator>Per Liedman</dc:creator>
				<category><![CDATA[What plane]]></category>

		<guid isPermaLink="false">http://per.liedman.net/?p=240</guid>
		<description><![CDATA[I&#8217;m still alive even if posts here are even less frequent than usual. What Plane? version 1.1.1 is now available for download. It has a lot of bug fixes, adds a small needle pointing the direction of the plane (if your compass works, mine never does on my HTC Desire), and also adds an application [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m still alive even if posts here are even less frequent than usual.</p>
<p><a href="http://www.liedman.net/share/WhatPlane-android-1.1.1.apk">What Plane? version 1.1.1</a> is now available for download. It has a lot of bug fixes, adds a small needle pointing the direction of the plane (if your compass works, mine never does on my HTC Desire), and also adds an application icon. I have more fun with this version than is really healthy.</p>
]]></content:encoded>
			<wfw:commentRss>http://per.liedman.net/2011/06/09/what-plane-1-1-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Ubuntu One for backup on a headless server</title>
		<link>http://per.liedman.net/2011/01/22/using-ubuntu-one-for-backup-on-a-headless-server/</link>
		<comments>http://per.liedman.net/2011/01/22/using-ubuntu-one-for-backup-on-a-headless-server/#comments</comments>
		<pubDate>Sat, 22 Jan 2011 13:26:10 +0000</pubDate>
		<dc:creator>Per Liedman</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://per.liedman.net/?p=224</guid>
		<description><![CDATA[Update 2011-12-28: I wrote a follow up post on how to fix some of the issues with the instructions below, especially with regard to Ubuntu 11.10 Oneiric Ocelot: Using Ubuntu One from a headless Oneiric Ocelot server Ok, let me start by stating that I know, and you should also know, that Ubuntu One and [...]]]></description>
			<content:encoded><![CDATA[<p><em>Update 2011-12-28:</em> I wrote a follow up post on how to fix some of the issues with the instructions below, especially with regard to Ubuntu 11.10 Oneiric Ocelot: <a href="http://per.liedman.net/2011/12/28/using-ubuntu-one-from-a-headless-oneiric-ocelot/">Using Ubuntu One from a headless Oneiric Ocelot server</a></p>
<p>Ok, let me start by stating that I know, and you should also know, that Ubuntu One and the other cloud storage services like DropBox are not for serious backups. So if you&#8217;re reading this post to learn something about backing up your enterprisy data, you have <em>come to the wrong place</em>. But if you&#8217;re like me, and have a server in your closet as a hobby, and just want some sort of backup that&#8217;s also off site, you have come to the right place.</p>
<p>The problem at hand: I have a server in my closet at home, and I store some stuff on it that I would be very sorry if I lost. (I also store a lot more on it that I don&#8217;t care the least about.) So, I want to back that stuff up. It&#8217;s primarily a couple of MySQL databases and some version control repositories.</p>
<p>Ubuntu comes with a cloud storage service called <a href="https://one.ubuntu.com/">Ubuntu One</a>. Ubuntu One gives you a free account with two gigabytes of storage, and you can pay a small subscription fee to get significantly more storage if you need it. While there are <a href="http://peterthorin.wordpress.com/2010/01/28/backup-solutions/">lots of other similar solutions</a>, Ubuntu One seems like a nice choice if you&#8217;re into Ubuntu, since its neatly integrated into the Gnome desktop.</p>
<p>The bad news is that for a headless (no screen) machine, like my server, Ubuntu One is currently a bit harder to set up. I really need the backups to work even if I don&#8217;t start a remote session and type my password, and so on. A backup that requires manual intervention is about as bad as no backup at all, in my opinion.</p>
<p>I was sort of frustrated when I found this out, and <a href="http://twitter.com/#!/liedman/status/23337089936392192">Twittered angrily</a> about the lack of command line interface. A couple of days later, I got a very friendly reply from Stuart Langridge (<a href="http://twitter.com/#!/sil">@sil</a>), who happens to be technical architect for Ubuntu One. Wow. Not only a response to my rant, but a short conversation ended up with enough clues for me to solve the problem at hand.</p>
<p>So, to save you from having to finding out the details yourself, here is how you could go about making Ubuntu One work as a backup for your headless server:</p>
<h3>Install ubuntuone-client-tools</h3>
<p>The program you need is called <code>u1sync</code>, and is distributed in a package called <code>ubuntuone-client-tools</code>. Install it:</p>
<p><code>sudo apt-get install ubuntuone-client-tools</code></p>
<h3>Get an authentication token</h3>
<p>The tricky part about getting Ubuntu One working standalone is really authentication. Normally, Ubuntu One authenticates using information stored in your Gnome keyring. On the server, you might not even have the keyring deamon installed, and even if it is, the backup must work even if you haven&#8217;t entered your keyring password, and so on. Fortunately, <code>u1sync</code> can authenticate without the keyring, but you will have to provide an <a href="http://en.wikipedia.org/wiki/OAuth">OAuth</a> token manually. Getting that token feels sort of like a hack, but this is how I do it:</p>
<ol>
<li>Go to a desktop machine where you have Ubuntu One set up with the account you want to use</li>
<li>Go to <strong>System</strong> menu -> <strong>Preferences</strong> -> <strong>Passwords and Encryption Keys</strong></li>
<li>Under the tab <strong>Passwords</strong>, you will find an entry called <strong>UbuntuOne token for https://ubuntuone.com</strong> &#8211; double click it.</li>
<li>In the dialog, open the password label and mark the <strong>Show password</strong> checkbox. It should now look something like this:
<p><img src="http://per.liedman.net/wp-content/uploads/2011/01/ubuntuone-oauth-token-dialog.png" alt="" title="Ubuntu One OAuth token dialog" width="361" height="332" class="aligncenter size-full wp-image-230" />
</li>
<li>Copy the text from the password field into a text editor of your choice. It will look like this:<br />
<code>oauth_token_secret=xxxx&#038;oauth_token=yyyy</code>, but with <code>xxxx</code> and <code>yyyy</code> replaced with much more gibberish. It&#8217;s those to parts of the strings you&#8217;re after.</li>
<li>In your backup script on your server (you have one of those already, right? Mine is based around <a href="http://sourceforge.net/projects/automysqlbackup/">AutoMySQLBackup</a> and lots of <code>tar</code> commands), insert this line somewhere at the end:<br/><code>u1sync --oauth=yyyy:xxxx [your backup folder]</code><br/>Note the order of things: u1sync needs to oauth token (key) first, and the secret as a seconds argument; at least for me, they were stored in the other way around in the keyring string.</lI>
<p>And that&#8217;s about it! The <code>u1sync</code> command will automatically synchronize the directory contents against your account every time the script is run. It will also output a lot of information about what it&#8217;s doing, so if you&#8217;re running the backup script from <code>cron</code> (you should), you might want to redirect the output to a log or <code>/dev/null</code>, or you will get lots of long mails.</p>
<p>Also note, that if you for some reason unauthorize the machine you got the OAuth token from, you will also unauthorize the backup server. Unauthorizing a machine really means revoking the OAuth token, and since the machines share the same token, both will now be unauthorized.</p>
<p>Finally, if you find out or already know a simpler way to get the OAuth token, I really interested in hearing about it. And yay for Ubuntu (One) and Stuart Langridge, thanks to them I now have an easy and free backup solution for at least the most critical stuff.</p>
]]></content:encoded>
			<wfw:commentRss>http://per.liedman.net/2011/01/22/using-ubuntu-one-for-backup-on-a-headless-server/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Mallorca-krisen och söderfamiljen</title>
		<link>http://per.liedman.net/2010/12/08/213/</link>
		<comments>http://per.liedman.net/2010/12/08/213/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 11:51:37 +0000</pubDate>
		<dc:creator>Per Liedman</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://per.liedman.net/?p=213</guid>
		<description><![CDATA[När Svenska Dagbladet publicerar en artikel om familjen Bramfors-Engelmarks försök att anpassa sitt liv efter klimathotet dröjer det inte länge innan det twittras i en lätt hånfull ton: Är den här snubben verklighetens svar på uppdiktade bloggen Söderfamiljen? http://tinyurl.com/38d5vd2 skriver Eric Rosén (@detljuvalivet), och Medelklassen tar till sig klimatpolitiken: &#8220;För ett par år sedan hade [...]]]></description>
			<content:encoded><![CDATA[<p>När Svenska Dagbladet publicerar en artikel om <a href="http://www.svd.se/nyheter/idagsidan/psykologi/klimathotet-har-andrat-deras-livsstil_5789585.svd">familjen Bramfors-Engelmarks försök att anpassa sitt liv efter klimathotet</a> dröjer det inte länge innan det twittras i en lätt hånfull ton:</p>
<blockquote><p>Är den här snubben verklighetens svar på uppdiktade bloggen Söderfamiljen? http://tinyurl.com/38d5vd2</p></blockquote>
<p>skriver Eric Rosén (<a href="http://twitter.com/detljuvalivet">@detljuvalivet</a>), och</p>
<blockquote><p>Medelklassen tar till sig klimatpolitiken: &#8220;För ett par år sedan hade vi också en mindre Mallorca-kris&#8221; http://bit.ly/hPq3Ke i @svdse</p></blockquote>
<p>skriver Jesper Nilsson (<a href="http://twitter.com/redundans">@redundans</a>). </p>
<p>Jag har svårt att se vari problemet med artikeln egentligen ligger, bortom själva formen av utslätat familje-reportage med Sara Trus-inslag, som knappast familjen själv kan klandras för. Man kan naturligtvis slå sig för knäna över den senaste i den oändliga räckan av vad som minst sagt utslitet brukar kallas för i-landsproblem: &#8220;Mallorca-kris&#8221;, och en mängd andra ordval i artikeln, men bortom det beskrivs ett reellt problem: människor som har en övertygelse (klimathotet är högst reellt och överhängande) som är i konflikt med mycket i deras livssituation.</p>
<p>Jag är inte helt på det klara med var kärnan i Rosén och Nilssons kritik ligger, men det verkar ligga någonstans mellan den upplevda självgodheten: &#8220;det finns något väldigt dömande i att han är övertygad om att det redan är kört, men att han är en av få som kommit till insikt.&#8221; skriver Rosén i en senare tweet, och att familjen tar på sig ett personligt ansvar: &#8220;Om man hanterar klimatproblemet med konsumtionshets och ångest istället för politik skall man hånas.&#8221; skriver Nilsson. Det sistnämnda blir för mig lätt obegripligt i då jag varken vet var det står om konsumtionshets, mer än att de försöker handla ekologiskt, och uttryckligen nämner en politisk frustration:</p>
<blockquote><p>Hon beskriver sig själv som en ganska realistisk person som mest känner ilska över att politikerna, som sitter på den verkliga makten att förändra, inte gör mer.</p></blockquote>
<p>Utan att veta något om hur varken Eric Rosén eller Jesper Nilssons familjesituationer, förvånas jag snarare över att de inte ger uttryck för den minsta igenkänning. Jag vet inte om det beror på att de själva ignorerar all oro för klimatet, eller om de lever i klimatneutralt liv utan konflikter med andra intressen. Själv känner jag däremot igen mig mycket i Bramfors-Engelmarks bekymmer, vilket troligen är anledningen att jag överhuvudtaget orkar irritera mig över den raljanta tonen mot dem.</p>
<p>Ur en barnfamiljs perspektiv upplever jag dagens Sverige ur miljöperspektiv ungefär som att vara en gravt överviktig på julbord: ett överflöd av saker du verkligen inte borde ta av, men både smarriga och som du snarast förväntas ta så mycket du kan av. Att förklara att man inte vill äta, d.v.s. köpa en större bil, större hus, resa till Thailand och varför inte en teppanyaki-häll, blir vare sig man vill eller inte till slut något av ett socialt problem, så vida man inte har turen att enbart omges av andra personer med samma värderingar. För mig är det detta artikeln handlar om, inte att familjen upplever sig som goda, eller deras politiska visioner (eller avsknad av dessa).</p>
<p>Att inte kunna se bakom det dåliga ordvalet &#8220;Mallorca-kris&#8221;, d.v.s. problematiken i att förklara för barn och släkt att man inte vill bli bjuden på solsemester för att man av princip inte vill flyga, tyder bara på en tröttsam brist på insikt.</p>
<p>Utan att gå in på varför och vad man skall göra åt det, så menar jag att det i allra högsta grad är relevant att illustrera de här problemen, så som SVD gör. All politisk förändring börjar inte med att skrika sig hes om klass och blåsa i vuvuzela.</p>
<p><strong>Uppdatering:</strong> Eric Rosén påtalar att han visst uttrycker förståelse för problematiken i en annan twitter-tråd: &#8220;självklart är en del av provokationen att det tangerar delar av ens eget liv. Ett uttryck för twittrarens egen klimatångest&#8221;, så helt svartvitt är det förstås inte (i samma tråd menar han dock också att Mikael Bramfors &#8220;låter som en pajas&#8221;).</p>
]]></content:encoded>
			<wfw:commentRss>http://per.liedman.net/2010/12/08/213/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A bit of JSON in my bucket</title>
		<link>http://per.liedman.net/2010/09/25/a-bit-of-json-in-my-bucket/</link>
		<comments>http://per.liedman.net/2010/09/25/a-bit-of-json-in-my-bucket/#comments</comments>
		<pubDate>Sat, 25 Sep 2010 09:49:32 +0000</pubDate>
		<dc:creator>Per Liedman</dc:creator>
				<category><![CDATA[Show me teh codes]]></category>

		<guid isPermaLink="false">http://per.liedman.net/?p=210</guid>
		<description><![CDATA[Since storing loose bits of code on my blog is far from ideal from pretty much any perspective, I took the time and put the JSON-ME source code up on BitBucket, with all its Mercurial goodness. Enjoy! https://bitbucket.org/liedman/json-me]]></description>
			<content:encoded><![CDATA[<p>Since storing loose bits of code on my blog is far from ideal from pretty much any perspective, I took the time and put the <a href="http://per.liedman.net/2010/06/07/the-lack-of-a-json-parser-for-j2me/">JSON-ME source code</a> up on BitBucket, with all its Mercurial goodness. Enjoy!</p>
<p><a href="https://bitbucket.org/liedman/json-me">https://bitbucket.org/liedman/json-me</a></p>
]]></content:encoded>
			<wfw:commentRss>http://per.liedman.net/2010/09/25/a-bit-of-json-in-my-bucket/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Flightradar24 for Android</title>
		<link>http://per.liedman.net/2010/09/25/flightradar24-for-android/</link>
		<comments>http://per.liedman.net/2010/09/25/flightradar24-for-android/#comments</comments>
		<pubDate>Sat, 25 Sep 2010 09:30:29 +0000</pubDate>
		<dc:creator>Per Liedman</dc:creator>
				<category><![CDATA[What plane]]></category>

		<guid isPermaLink="false">http://per.liedman.net/?p=201</guid>
		<description><![CDATA[So, Flightradar24 finally developed their own Android application. I figured they would do that, and that it would pretty much make What Plane? obsolete. To my surprise, the app they actually released is surprisingly thin, and at least for me personally does not give the information I&#8217;m actually interested in. Ok, they have map, which [...]]]></description>
			<content:encoded><![CDATA[<p>So, <a href="http://flightradar24.com">Flightradar24</a> finally developed their own Android application. I figured they would do that, and that it would pretty much make <a href="http://per.liedman.net/2010/07/26/what-plane/">What Plane?</a> obsolete. To my surprise, the app they actually released is surprisingly thin, and at least for me personally does not give the information I&#8217;m actually interested in.</p>
<p>Ok, they have map, which makes the app look more polished, but apart from that, you only get the aircrafts&#8217; callsign and airline; to me, that&#8217;s the least interesting information. So, I actually still prefer What Plane &#8211; no fancy map, just the real information (like destination, point of departure, aircraft model, etc.) on the planes that are actually nearby. Perhaps that&#8217;s something they&#8217;ll put in the pay version of their app.</p>
<p>Anyway, go ahead and try the Flightradar24 app, it&#8217;s not bad, although it solves another information need than the one I tried to cover in What Plane:<br />
<img src="http://fs01.androidpit.info/aqr/x30/885630-1284562582851.png" alt="Flightradar24 Android application barcode" /></p>
<p>(What&#8217;s the best way to link to an android market app? Is linking the barcode like above the standard way of doing it?)</p>
]]></content:encoded>
			<wfw:commentRss>http://per.liedman.net/2010/09/25/flightradar24-for-android/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Refuserade självporträtt</title>
		<link>http://per.liedman.net/2010/09/12/refuserade-sjalvportratt/</link>
		<comments>http://per.liedman.net/2010/09/12/refuserade-sjalvportratt/#comments</comments>
		<pubDate>Sun, 12 Sep 2010 11:37:26 +0000</pubDate>
		<dc:creator>Per Liedman</dc:creator>
				<category><![CDATA[Photo]]></category>

		<guid isPermaLink="false">http://per.liedman.net/?p=183</guid>
		<description><![CDATA[I ett vagt försök att återuppta fotograferande som inte bara gäller barn är jag numera med i Flickr-gruppen Veckans fotouppgift. Uppgiften vecka 36 är att ta ett självporträtt. Mitt bidrag är upplagt här, men eftersom jag hade en hel del andra varianter så roar jag mig med att publicera några av dem här. Första försöket [...]]]></description>
			<content:encoded><![CDATA[<p>I ett vagt försök att återuppta fotograferande som inte bara gäller <a href="http://www.flickr.com/photos/liedman/4352594709/">barn</a> är jag numera med i Flickr-gruppen <a href="http://www.flickr.com/groups/1514820@N23/pool/with/4982378280/">Veckans fotouppgift</a>. Uppgiften vecka 36 är att ta ett självporträtt.</p>
<p>Mitt bidrag är <a href="http://www.flickr.com/photos/liedman/4982378280/in/pool-1514820@N23/">upplagt här</a>, men eftersom jag hade en hel del andra varianter så roar jag mig med att publicera några av dem här.</p>
<p><a href="http://per.liedman.net/wp-content/uploads/2010/09/img_4541.jpg"><img src="http://per.liedman.net/wp-content/uploads/2010/09/img_4541-200x300.jpg" alt="" title="Självporträtt - utkast #1" width="200" height="300" class="alignnone size-medium wp-image-184" /></a><br />
Första försöket &#8211; lång slutartid, idén är att få något slags rörelse dokumenterad, samt låta mindre ljuskällor i det i övrigt mörka rummet göra något roligt. Tyvärr ser jag inte klok ut, och det var svårt att få skärpa i mitt ansikte.</p>
<p><a href="http://per.liedman.net/wp-content/uploads/2010/09/img_4548.jpg"><img src="http://per.liedman.net/wp-content/uploads/2010/09/img_4548-200x300.jpg" alt="" title="Självporträtt - utkast #2" width="200" height="300" class="alignnone size-medium wp-image-185" /></a><br />
Ok, vi försöker med att komma lite närmare, och bort med mitt huvud så man slipper se min konstiga kroppsställning. Lite intetsägande, tycker jag nog själv.</p>
<p><a href="http://per.liedman.net/wp-content/uploads/2010/09/img_4554.jpg"><img src="http://per.liedman.net/wp-content/uploads/2010/09/img_4554-300x200.jpg" alt="" title="Självporträtt - utkast #3" width="300" height="200" class="alignnone size-medium wp-image-186" /></a><br />
Ok, har nu övergivit hela lång slutartid-idén. Mörker, konstiga ljuskällor. Och låt oss ta bort halva mitt ansikte, det vill ju ändå inte bli bra. Resultat: krystad kroppsposition och fortfarande inte särskilt upplyftande. Dags att lägga sig och försöka igen imorgon.</p>
<p><a href="http://per.liedman.net/wp-content/uploads/2010/09/img_4578-Modified-in-GIMP-Image-Editor.jpg"><img src="http://per.liedman.net/wp-content/uploads/2010/09/img_4578-Modified-in-GIMP-Image-Editor-178x300.jpg" alt="" title="Självporträtt - slutresultatet" width="178" height="300" class="alignnone size-medium wp-image-187" /></a><br />
Slutresultatet: rätt radikalt annorlunda, mestadels på grund av att jag helt plötsligt fick arbeta med dagsljus istället för nattmörker. Förvånansvärt svårt att få rätt del av ansiktet att hamna på bild när man själv är både framför och bakom kameran, den här bilden är beskuren. Reducerad till svartvitt med överdriven kontrast genom att sätta röd-grön-blå-inställningarna till 80/60/-40 i channel mixer, vilket ger huden ett onaturligt blekt och slätt uttryck, samt gör mina blå ögon väldigt mörka. Säger som <a href="http://www.flickr.com/photos/ol/4979276807/in/pool-1514820@N23/">Ola Lindberg</a>, d.v.s jag vet inte riktigt vad den säger om mig, men det är iallafall ett självporträtt.</p>
]]></content:encoded>
			<wfw:commentRss>http://per.liedman.net/2010/09/12/refuserade-sjalvportratt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More planes</title>
		<link>http://per.liedman.net/2010/08/10/more-planes/</link>
		<comments>http://per.liedman.net/2010/08/10/more-planes/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 07:50:55 +0000</pubDate>
		<dc:creator>Per Liedman</dc:creator>
				<category><![CDATA[What plane]]></category>

		<guid isPermaLink="false">http://per.liedman.net/?p=180</guid>
		<description><![CDATA[A quick update. Since I got an Android phone (an HTC Desire, yay!), I&#8217;ve tested my What Plane application on a real device. I&#8217;ve fixed some minor issues, so that it actually sort of works outside the emulator. The updated version, 1.0.1, is here: WhatPlane-1.0.1.apk]]></description>
			<content:encoded><![CDATA[<p>A quick update. Since I got an Android phone (an HTC Desire, yay!), I&#8217;ve tested my <a href="http://per.liedman.net/2010/07/26/what-plane/">What Plane</a> application on a real device. I&#8217;ve fixed some minor issues, so that it actually sort of works outside the emulator.</p>
<p>The updated version, 1.0.1, is here: <a href='http://per.liedman.net/wp-content/uploads/2010/07/WhatPlane-1.0.1.apk'>WhatPlane-1.0.1.apk</a></p>
]]></content:encoded>
			<wfw:commentRss>http://per.liedman.net/2010/08/10/more-planes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What plane?</title>
		<link>http://per.liedman.net/2010/07/26/what-plane/</link>
		<comments>http://per.liedman.net/2010/07/26/what-plane/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 14:49:06 +0000</pubDate>
		<dc:creator>Per Liedman</dc:creator>
				<category><![CDATA[What plane]]></category>

		<guid isPermaLink="false">http://per.liedman.net/?p=168</guid>
		<description><![CDATA[So, I&#8217;ve made my first Android application. That was a nice experience, especially after having hacked J2ME on Symbian for a short while. Only sad thing is that I haven&#8217;t got an Android phone, so I can only use my app in the emulator, which is boring as hell, since it&#8217;s a GPS based application. [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;ve made my first Android application. That was a nice experience, especially after having hacked J2ME on Symbian for a short while. Only sad thing is that I haven&#8217;t got an Android phone, so I can only use my app in the emulator, which is boring as hell, since it&#8217;s a GPS based application. Well, I&#8217;m getting ahead of myself &#8211; so first some background about me, and then some more about that app.</p>
<p>Sometime in my early twenties, I once spent something like two whole days flying around the world in Microsoft Flight Simulator, in realtime. My old friends still like to remind me of this slightly autistic and highly nerdy feat once in a while. For my own part, it&#8217;s mostly a reminder of the oceans of free time I had while studying at university (I distinctly remember spending a considerable amount of the hours over the pacific studying for some math course I took at the time).</p>
<p>These days, I don&#8217;t even have flight simulator installed, but my interest in airliners and flying still linger in the back of my mind, and when the skies are clear, I often find myself drifting off, thinking about the contrails I see, what aircraft it might be, where they&#8217;re heading and where they&#8217;re coming from. In the last year, this little hobby has gotten a bit more interesting, thanks to a site called <a href="http://flightradar24.com/">flightradar24.com</a>, which makes it easy to check if it actually was a 747 that just passed by overhead, or if it was some other four engine model. (As a side note, flightradar24.com got a lot of media attention while the Icelandic ash cloud from Eyjafjallajökull grounded most air traffic over Europe for a couple of weeks, since everyone was very keen on seeing all the planes that weren&#8217;t flying. That was sort of weird. Anyway.)</p>
<p>The only thing that isn&#8217;t perfect about flightradar24.com for my little hobby, is that I&#8217;m not very often at a computer when I spot aircraft, and that their site is very Javascript-based, and hence not very useful in a phone browser. To solve this issue, some on and off hacking for a couple of months have resulted in a solution:</p>
<ul>
<li>A web service that uses data from Flightradar24.com to list the planes currently closest to a certain location, and presenting it as HTML, JSON or HTML</li>
<li>A small application for Symbian/J2ME that uses a phone&#8217;s GPS to query the mentioned web service</li>
<li>A small application for Android that does the same</li>
</ul>
<p>The Symbian version is still a bit too much of a hack to actually show to anyone else, but the server parts and the Android application is in a state which I feel is sort of usable. So, if you&#8217;re interested, here&#8217;s the application file for version 1.0.0 of <em>What plane?</em>, which will show you the five aircraft closest to where you are, their direction and distance, and some more detailed information on model, airline, where they&#8217;re heading, and so on.</p>
<p><del datetime="2010-08-10T07:40:30+00:00">WhatPlane-1.0.0.apk</del><br />
<em><strong>Updated 2010-08-10: </strong></em><del datetime="2011-06-09T21:20:36+00:00">WhatPlane-1.0.1.apk</del><br />
<em><strong>Updated 2011-06-09: </strong></em><a href="http://www.liedman.net/share/WhatPlane-android-1.1.1.apk">WhatPlane-android-1.1.1.apk</a></p>
<p>&#8230;and for those anxious of you who absolutely need screenshots, here&#8217;s a couple of those:<br />
<div id="attachment_171" class="wp-caption alignnone" style="width: 334px"><a href="http://per.liedman.net/wp-content/uploads/2010/07/Whatplane-screenshot1.png"><img src="http://per.liedman.net/wp-content/uploads/2010/07/Whatplane-screenshot1.png" alt="" title="Screenshot 1" width="324" height="484" class="size-full wp-image-171" /></a><p class="wp-caption-text">List of closest aircraft</p></div><br />
<div id="attachment_172" class="wp-caption alignnone" style="width: 338px"><a href="http://per.liedman.net/wp-content/uploads/2010/07/Whatplane-screenshot2.png"><img src="http://per.liedman.net/wp-content/uploads/2010/07/Whatplane-screenshot2.png" alt="" title="Whatplane-screenshot2" width="328" height="480" class="size-full wp-image-172" /></a><p class="wp-caption-text">Aircraft details</p></div></p>
<p>For those interested, I plan to make the source available at some point in the future (that I haven&#8217;t done it already is mostly because I don&#8217;t know where it&#8217;s best to host it, and I haven&#8217;t got that much time to work on this). Also, it must be noted that all the data shown in the application is from flightradar24.com &#8211; and it&#8217;s really <em>their</em> data. I haven&#8217;t checked with them if it&#8217;s ok to use it in this way, but since they&#8217;re a free service, aggregating information mostly from enthusiasts sharing the data from their ADS-B receivers, I hope this application is in the spirit of their vision.</p>
]]></content:encoded>
			<wfw:commentRss>http://per.liedman.net/2010/07/26/what-plane/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>(The lack of a) JSON parser for J2ME</title>
		<link>http://per.liedman.net/2010/06/07/the-lack-of-a-json-parser-for-j2me/</link>
		<comments>http://per.liedman.net/2010/06/07/the-lack-of-a-json-parser-for-j2me/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 20:49:07 +0000</pubDate>
		<dc:creator>Per Liedman</dc:creator>
				<category><![CDATA[Show me teh codes]]></category>

		<guid isPermaLink="false">http://per.liedman.net/?p=151</guid>
		<description><![CDATA[In a pet project I&#8217;m spending my nights working on (hopefully more about that in a later post), I found myself in need of a JSON parser, or deserializer, for J2ME/CLDC. A bit to my surprise, I found that such a thing was not easy to find, even with the whole of the internets at [...]]]></description>
			<content:encoded><![CDATA[<p>In a pet project I&#8217;m spending my nights working on (hopefully more about that in a later post), I found myself in need of a JSON parser, or deserializer, for J2ME/CLDC. A bit to my surprise, I found that such a thing was not easy to find, even with the whole of the internets at my disposal.</p>
<p>To summarize, it appears that there has been a JSON lib for J2ME up on <a href="http://www.google.se/search?aq=f&#038;ie=UTF-8&#038;q=org.json.me.zip">json.org at some point</a>, but at least I can&#8217;t find it any longer. Also, <a href="https://meapplicationdevelopers.dev.java.net/mobileajax.html">some project on java.net</a> is popular to link to, but come on, no download link? No pre-compiled JAR-file?</p>
<p>Anyway, after <a href="http://stackoverflow.com/questions/2981296/json-parser-for-j2me">asking over at stackoverflow.com</a> and getting surprisingly few answers, at least I found a link to some code that was easy enough to grab.</p>
<p>As some kind of attempt to give back to the community, I upload the compiled JAR from that source code here. So if you need to serialize, deserialize, marshal or unmarshal JSON from J2ME/CLDC, grab this JAR and go ahead:</p>
<ul>
<li>Compiled JAR: <a href='http://per.liedman.net/wp-content/uploads/2010/06/json-me.jar'>json-me.jar</a></li>
<li><del datetime="2010-09-25T09:42:04+00:00">Source code: <a href='http://per.liedman.net/wp-content/uploads/2010/06/json-me.tar.gz'>json-me.tar.gz</a></del> <strong>Updated 2010-09-25:</strong> the source is now <a href="http://bitbucket.org/liedman/json-me">available on BitBucket</a></li>
</ul>
<p>The code is most likely a copy of the one that was previously posted on json.org, and is distributed under <a href="http://www.json.org/license.html">the json.org license</a> according to the copyright notice in the source (most importantly: &#8220;The Software shall be used for Good, not Evil.&#8221;)</p>
<p>As a very tiny modification, I have added the methods <i>remove</i> and <i>removeAll</i> to the class <i>JSONArray</i>, since I really needed them. I hope you don&#8217;t mind too much.</p>
]]></content:encoded>
			<wfw:commentRss>http://per.liedman.net/2010/06/07/the-lack-of-a-json-parser-for-j2me/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

