<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Zero_Dogg]]></title>
  <link href="http://blog.zerodogg.org//atom.xml" rel="self"/>
  <link href="http://blog.zerodogg.org//"/>
  <updated>2012-07-02T08:41:11+02:00</updated>
  <id>http://blog.zerodogg.org//</id>
  <author>
    <name><![CDATA[Eskild Hustvedt]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Announcing gpgpwd]]></title>
    <link href="http://blog.zerodogg.org//2012/06/15/announcing-gpgpwd/"/>
    <updated>2012-06-15T18:58:00+02:00</updated>
    <id>http://blog.zerodogg.org//2012/06/15/announcing-gpgpwd</id>
    <content type="html"><![CDATA[<p>I&#8217;ve just released <a href="http://random.zerodogg.org/gpgpwd/"><code>gpgpwd</code></a>.
It is a simple password manager for people that live on the command-line. It
stores a list of passwords in a GnuPG encrypted file, which it then provides
an interface for retrieving, adding, changing and removing entries from.</p>

<p>The basics are simple: <code>gpgpwd set X</code> sets the entry for X in the file. The
password is not accepted on the command-line, but will be requested
interactively to avoid it showing up in <code>ps</code>. <code>gpgpwd</code> will provide you with
a randomly generated password that you can use, or you can provide your own.
<code>gpgpwd get X</code> retrieves the entry for X (and copies it to the X11 clipboard
unless <code>--no-xclip</code> is supplied) - this command takes a regex, so  you don&#8217;t
have to type out the entire name each time. Finally <code>gpgpwd remove X</code> removes
the entry for X.</p>

<p>In addition to these basic commands it also has a few extra features to make
life a bit more convenient, the main one being <code>git</code> support. You can tell
gpgpwd that your password file is inside git, which will make gpgpwd <code>git pull</code>
before reading the file, and <code>git commit</code>+<code>git push</code> after writing to it,
allowing you to easily synchronize your password between several computers.
It also has a command that will let you batch add passwords from a file, if
you&#8217;re importing passwords you already have stored.</p>

<p>You can <a href="http://random.zerodogg.org/gpgpwd/download/">grab it</a> from
its <a href="http://random.zerodogg.org/gpgpwd/">website</a>, where you can
also read the full <a
href="http://random.zerodogg.org/gpgpwd/manpage/">manpage</a>. If you give it
a go and have some feedback, I&#8217;d love to hear from you - either in the comments
here, via e-mail, IRC or through the github issue tracker for gpgpwd.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[wwine 0.2 released]]></title>
    <link href="http://blog.zerodogg.org//2012/04/14/wwine-0-dot-2-released/"/>
    <updated>2012-04-14T15:00:00+02:00</updated>
    <id>http://blog.zerodogg.org//2012/04/14/wwine-0-dot-2-released</id>
    <content type="html"><![CDATA[<p>I&#8217;ve just released wwine 0.2. It adds support for the new Crossover 11.0
release, which changes some of the paths and needs a bit of additional magic to
use. It also has some improvements to the wrapper scripts it generates,
primarily through a new and more robust metadata header.</p>

<p>The most interesting new feature however, is the addition of the &#45;-env and
&#45;-tricks parameters. &#45;-env causes wwine to set the WINE and WINEPREFIX
variables to the syntax used by vanilla wine, this allows various wine scripts
that use those to be able to run using wwine&#8217;s bottles, as well as with
crossover. The most interesting use of this is the ability to use winetricks
with Crossover. This effectively lets you use Crossover as any other wine
release, while still using Crossover&#8217;s bottles. So if you have winetricks and
Crossover installed, you need only run <code>wwine -w cx -b BOTTLE --tricks
ACTION</code> to use winetricks with Crossover.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Blog migrated to octopress]]></title>
    <link href="http://blog.zerodogg.org//2012/02/26/blog-migrated-to-octopress/"/>
    <updated>2012-02-26T12:53:00+01:00</updated>
    <id>http://blog.zerodogg.org//2012/02/26/blog-migrated-to-octopress</id>
    <content type="html"><![CDATA[<p>I have finally gotten around to migrating my blog from
<a href="http://wordpress.org">wordpress</a> to <a href="http://octopress.org">octopress</a>.</p>

<p>Octopress is &#8220;A blogging framework for hackers&#8221;. It&#8217;s based on
<a href="http://jekyllrb.com/">jekyll</a>, a ruby framework for generating static
websites. What sold me on it is the ability to use the best blog-writing client
available, a normal shell along with <a href="http://www.vim.org">vim</a>. Blog posts are
written in <a href="http://daringfireball.net/projects/markdown/">markdown</a> (by
default), the source is in git, and it comes with rake targets for creating new
posts, building it and deploying it.</p>

<p>As this should make it a lot easier to write posts, I&#8217;m hoping that it just
might make me post more often.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[jqsimple-class 0.1.1]]></title>
    <link href="http://blog.zerodogg.org//2010/09/27/jqsimple-class-0-1-1/"/>
    <updated>2010-09-27T17:37:41+02:00</updated>
    <id>http://blog.zerodogg.org//2010/09/27/jqsimple-class-0-1-1</id>
    <content type="html"><![CDATA[<p>Last week I released version 0.1.1 of <a href="http://random.zerodogg.org/jqsimple-class">jQsimple-class</a>. The main addition in this version is support for using jQsimple-class in <a href="http://www.commonjs.org/">CommonJS</a> environments, such as <a href="http://nodejs.org/">node.js</a>. All one has to do is place the CommonJS build of jqsimple-class somewhere in the include path and then do:</p>

<pre><code>var jClass = require('jqsimple-class').jClass;
</code></pre>

<p>From there on out the API is the same as the browser one. The CommonJS build also has the same testsuite as the normal build, and passes all of the tests.</p>

<p>Outside of that, the standalone build has been stripped down to the bare necessities, shrinking the minified standalone build of jQsimple-class from 10KiB to 3KiB (the version that uses jQuery is just 1.5KiB).</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[jQsimple-class released]]></title>
    <link href="http://blog.zerodogg.org//2010/09/16/jqsimple-class-released/"/>
    <updated>2010-09-16T23:05:09+02:00</updated>
    <id>http://blog.zerodogg.org//2010/09/16/jqsimple-class-released</id>
    <content type="html"><![CDATA[<p>Today I&#8217;ve released the first version of <a href="http://random.zerodogg.org/jqsimple-class">jQsimple-class</a>, a small JavaScript class-declaration library. The reason I wrote it is that the usual way of building classes in JavaScript is frankly quite ugly, and inheritance is equally ugly. With jQsimple-class I&#8217;ve tried to make it as simple and intuitive as possible to write classes in JavaScript. The library itself is very small, and the syntax is simple. It&#8217;s meant to let you quickly declare a class, and easily extend others, and then get completely out of your way. It only exports a single variable/function, named jClass (Class is a reserved word in JavaScript, so I went for the next best thing). Using jClass, and methods on it, it is possible to build classes, virtual classes and extend classes.</p>

<p><code>jClass()</code> takes a single parameter, a JavaScript hash, where keys are method or attribute names, and the values are any valid JavaScript type. <code>jClass.extend()</code> lets you build a class that extends one or more existing classes. <code>jClass.virtual()</code> lets you construct a &#8220;virtual&#8221; class. That is to say, a class that can not be instantiated, but that can be extended by others.</p>

<p>Internally jQsimple-class uses some <a href="http://www.jquery.com/">jQuery</a> methods, but it does not depend upon jQuery to be used, a standalone version that bundles the parts it needs (not all of jQuery, and without exposing them to the public namespace) is available for applications that do not use jQuery. I have written an extensive testsuite for jQsimple-class to make sure that things work as they should, and it works across all modern browsers.</p>

<p>For more examples and the full API, see the <a href="http://random.zerodogg.org/jqsimple-class/documentation">jQsimple-class documentation</a>. jQsimple-class version 0.1 is <a href="http://random.zerodogg.org/jqsimple-class/download">available for download</a> now. Minified it is only 1.5K (or 9K for the standalone version). Any feedback is welcome, feel free to do so in the comments, or, if you find a bug, on the <a href="http://random.zerodogg.org/jqsimple-class/bugs">bugtracker</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[A very simple one-liner REPL for perl]]></title>
    <link href="http://blog.zerodogg.org//2010/03/02/a-very-simple-one-liner-repl-for-perl/"/>
    <updated>2010-03-02T15:42:01+01:00</updated>
    <id>http://blog.zerodogg.org//2010/03/02/a-very-simple-one-liner-repl-for-perl</id>
    <content type="html"><![CDATA[<p>Here&#8217;s a very simple one-liner REPL for perl, it&#8217;s not very advanced (like ie. <a href="http://search.cpan.org/~mstrout/Devel-REPL-1.003007/lib/Devel/REPL.pm">re.pl</a>) but does well in most cases:</p>

<pre><code>perl -MData::Dumper -MTerm::ReadLine -e '$r = Term::ReadLine-&gt;new(1);while(defined($_ = $r-&gt;readline("code:  "))){$ret=Dumper(eval($_));$err=$@;if($err ne ""){print $err;}else{print $ret;}}'
</code></pre>

<p>It uses Term::ReadLine, which gives a simple session history if you have a Term::ReadLine::* implementation that supports it. It will also use Data::Dumper so that you can quickly see any data structures, you can always use scalar(STATEMENT) if the return value differs in list and scalar context.</p>

<p>Here&#8217;s an alias that can be shoved into .bashrc :</p>

<pre><code>alias 'perl-repl'='perl -MData::Dumper -MTerm::ReadLine -e '\''$r = Term::ReadLine-&gt;new(1);while(defined($_ = $r-&gt;readline("code:  "))){$ret=Dumper(eval($_));$err=$@;if($err ne ""){print $err;}else{print $ret;}}'\'''
</code></pre>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[SWEC 0.4]]></title>
    <link href="http://blog.zerodogg.org//2009/10/15/swec-0-4/"/>
    <updated>2009-10-15T17:21:01+02:00</updated>
    <id>http://blog.zerodogg.org//2009/10/15/swec-0-4</id>
    <content type="html"><![CDATA[<p>About two weeks back I released <a href="http://random.zerodogg.org/swec/">SWEC version 0.4</a>. The largest new thing in this release is an updated file format for writing test definitions.  Thew new format is a lot more flexible, and will also allow me to extend its syntax with more capabilities more easily later on. It can still read the old file format, and I&#8217;ll keep the compat code in there until SWEC 0.6 - so people have time to update their files (only minor changes are needed to update them to the new file format, should only take a couple of minutes).</p>

<p>Other than that I extended the command-line parser, so you can now say &#8221;<code>swec example.com -s /test.html</code>&#8221; where you would previously have had to do &#8221;<code>swec --baseurl example.com -s /test.html</code>&#8221;. Other than that it&#8217;s mostly a bunch of cleanups, some refactoring and a few minor bugfixes, in addition to a new test suite so the thing can be properly sanity-checked before release.</p>

<p>If you need to sanity check dynamic websites, give <a href="http://random.zerodogg.org/swec/">SWEC</a> a go.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Fixing PHP documentation woes]]></title>
    <link href="http://blog.zerodogg.org//2009/10/14/fixing-php-documentation-woes/"/>
    <updated>2009-10-14T16:50:27+02:00</updated>
    <id>http://blog.zerodogg.org//2009/10/14/fixing-php-documentation-woes</id>
    <content type="html"><![CDATA[<p>I prefer writing in Perl or Ruby, but sometimes the choice of language has been made by someone else, a position I have found myself in lately. When using perl and ruby, there&#8217;s always <code>perldoc</code> and <code>ri</code>, so documentation is a quick command away in any of my terminals, which thanks to <em>screen</em> is never fewer than ten. PHP however, has no such tool, the docs are in HTML and many distros don&#8217;t even package the HTML docs. So, to avoid the pain of switching out of the safety of my terminal and into a web browser all the time, and speed up my work, I wrote an app, <a href="http://random.zerodogg.org/phpdocr">phpdocr</a>. It&#8217;s quite simple, it scrapes php.net (and caches the result for quick viewing later) and displays the parsed HTML in your pager - resulting in something sort of like <code>perldoc</code> or <code>ri</code>. So if you have the same itch, grab it from <a href="http://random.zerodogg.org/phpdocr">http://random.zerodogg.org/phpdocr</a>.</p>

<p>The app itself, of course, is not written in PHP - it&#8217;s written in ruby.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Sanity checking mason]]></title>
    <link href="http://blog.zerodogg.org//2009/10/13/sanity-checking-mason/"/>
    <updated>2009-10-13T16:27:54+02:00</updated>
    <id>http://blog.zerodogg.org//2009/10/13/sanity-checking-mason</id>
    <content type="html"><![CDATA[<p>I have found myself doing quite a bit of <a href="http://www.masonhq.com/">mason</a> at work lately, both maintaining old legacy stuff and as the view in a <a href="http://www.catalystframework.org/">catalyst</a> app.</p>

<p>While doing this I found myself missing the old &#8216;perl -c&#8217; to quickly sanity check code, however naturally that won&#8217;t work on Mason - as mason is essentially HTML with inline perl, not the other way around. As such I wrote a quick script that emulates &#8216;perl -c&#8217; by loading the file using mason inside eval then printing any errors. The script itself is pretty simple, though it doesn&#8217;t have any support for printing useful line numbers - but at least it gives an idea of what/where the problem is. The script also declares $c and $m, as at least for Catalyst - those will be available.</p>

<p><a href="http://random.zerodogg.org/snippets/masontest">You can clone the gist, or just copy+paste the code:</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Dynamically loading git bash-completion]]></title>
    <link href="http://blog.zerodogg.org//2009/10/12/dynamically-loading-git-bash-completion/"/>
    <updated>2009-10-12T22:27:05+02:00</updated>
    <id>http://blog.zerodogg.org//2009/10/12/dynamically-loading-git-bash-completion</id>
    <content type="html"><![CDATA[<p>I have to admit, I love <a href="http://git-scm.com/">git</a>. It has really made me more efficient, and I can&#8217;t honestly think of ever switching back to ie. svn.</p>

<p>My shell is bash, and up until now I used a very simple bash completion for git, but at times I do see myself wanting something a bit more comprehensive. However, I really don&#8217;t want bash to be slow to open (of course, the definition of &#8220;slow&#8221; is quite individual - over a second is way too much ;), which it can be if it needs to load all bash completion definitions when starting. Therefore I wrote a small bash function for my .bashrc that will dynamically load the git bash completion when it first is accessed. Bash starts fast, and I get git bash completion - problem solved (well, the first time git bash completion is used, it of course takes a tad longer than normal because it needs to load it first, but that&#8217;s completely livable). As a bonus, it will fall back to my old and simple completion if the proper one is not available.</p>

<p><a href="http://random.zerodogg.org/snippets/gitdynacomp">Here&#8217;s the code snippet:</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Vote for the Socialist Left Party on the 14th of September]]></title>
    <link href="http://blog.zerodogg.org//2009/09/10/vote-for-the-socialist-left-party-on-the-14th-of-september/"/>
    <updated>2009-09-10T21:25:50+02:00</updated>
    <id>http://blog.zerodogg.org//2009/09/10/vote-for-the-socialist-left-party-on-the-14th-of-september</id>
    <content type="html"><![CDATA[<p><strong>Disclaimer:</strong> This is a political post. If you&#8217;re not interested in politics (or not interested in <em>Norwegian</em> politics), please ignore it.</p>

<p>The date for the Norwegian general election is closing up fast, and I would like to urge my readers to vote for the Socialist Left Party (SV). The last chance to vote before the actual election day is, in many municipalities, tomorrow, the 11th of September. The actual election day is the 14th of September. Remember that every single vote counts!</p>

<p>We don&#8217;t need any dark blue experiment with our economy, healthcare or our children. We need a fairer government that works for equality, that takes the climate changes seriously and are prepared to act now rather than later, when it&#8217;s too late. We need a country where women earns the same as men, not merely 85% (avg.) of what a man makes and we need to treat everyone with the same amount of respect.</p>

<p>The economic crisis has shown us how bad it can get when we allow as much market freedom as we do. There are a few select people that gamble away at the stock market, keeping any earnings for themselves while socializing the problem if they experience losses. Norway has, largely thanks to SV&#8217;s socialist finance minister, <a href="http://www.cnbc.com/id/30743451/">managed the financial crisis very well</a>. We need a market that is <em>more</em> controlled, not less! We can not allow capitalists to gamble away our jobs, nor can we allow the parties on the right to privatize our healthcare system, and by doing so throwing that into the same chaos that has caused the crisis we are now in.</p>

<p>If you want more information about SV&#8217;s politics, visit <a href="http://www.sv.no/">http://www.sv.no/</a> (<a href="http://sv.no/Language/English">http://sv.no/Language/English</a> for English), or <a href="http://www.zerodogg.org/me/contact">contact me</a> directly and I will try to answer any questions you have.</p>

<p>For these reasons, and more (see the website), vote SV the 14th of September.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Music sorting 0.2]]></title>
    <link href="http://blog.zerodogg.org//2009/08/14/music-sorting-0-2/"/>
    <updated>2009-08-14T20:00:49+02:00</updated>
    <id>http://blog.zerodogg.org//2009/08/14/music-sorting-0-2</id>
    <content type="html"><![CDATA[<p>Last week I released <a href="http://random.zerodogg.org/mussort">mussort</a> version 0.2. This release is a huge update from version 0.1 that I released back in early 2008.</p>

<p>mussort is a simple command-line music sorting program. It recursively processes a directory tree, and then sorts whatever music files it finds there, renaming the files and putting them in a nice directory tree.</p>

<p>0.2 added a load of features designed to make mussort faster. It introduced optional caching of file tags, which has a <strong>major</strong> impact on the performance on subsequent runs on a directory tree. I optimized away an insane amount of readdir() calls that it kept doing over and over, even though nothing had actually changed since the last readdir(). It also only supported <em>id3info</em> and <em>ogginfo</em> as sources for information, which is problematic because ogginfo is very very slow at times. So in 0.2 it can use the <em>Audio::File</em> perl module if it is available. It provides redundancy (should Audio::File fail for an ogg file, it falls back to ogginfo, should id3info fail for an mp3 file it tries Audio::File) and a large speed increase for ogg vorbis files. It can also use <em>id3v2</em> if it is available. Because of the caching however, even without Audio::File, any subsequent runs on ogg vorbis files will be a lot faster.</p>

<p>When it comes to actual features, the largest one is support for detection of compilation albums. It will locate an album that contains a lot of different artists and then put those into a single directory named after the album, rather than put them into separate artist/album dirs. For those that don&#8217;t want that, it is important to note that the feature is optional and must be explicitly requested (like case-insensitive sorting).</p>

<p>Other than that there&#8217;s a bunch of code cleanups, along with minor additions, such as selectable verbosity (&#8211;verbose, &#8211;quiet) and the option to keep all duplicate files around (&#8211;keepdupes). mussort is also now <a href="http://github.com/zerodogg/swec">hosted on github</a>, so if you are interested, fork the repository and let&#8217;s see what cool stuff you can come up with! Remember to prod me with a pull request so that any nice things you do get included upstream.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Day Planner 0.10]]></title>
    <link href="http://blog.zerodogg.org//2009/04/16/day-planner-010/"/>
    <updated>2009-04-16T21:19:16+02:00</updated>
    <id>http://blog.zerodogg.org//2009/04/16/day-planner-010</id>
    <content type="html"><![CDATA[<p>Day Planner 0.10 was released on the 25th of March! This release is, imho, a great step forward from 0.9. It fixes various minor bugs, cleans up parts of the UI, handles strange or broken iCalendar files better, enforces UTF-8 encoding on the calendar and adds a plugin system.</p>

<p>The largest new feature is the plugin system. Day Planner now comes with support for plugins, complete with a simple file format that allows users to easily install third party plugins.  Its purpose is of course to make it easy for other people to alter the behaviour of Day Planner, or add features to it easily, without having to resort to patching the app itself, but also to make it easier for me to add optional features that perhaps not everyone wants (for instance, 0.10 comes with a tray icon plugin. It is disabled by default, but those that want to use it can do so quite easily). The API is simple, and somewhat inspired by the Gtk2-perl API, to make it feel somewhat familiar for people already used to signal-based programming.</p>

<p>The tarball comes with an example plugin, plugins/HelloWorld.pm that is well commented and explains how to do some of the basic things like hooking into signals, displaying simple dialog boxes and adding events to the calendar. The API itself is documented in DP::CoreModules::Plugin (access the documentation by running perldoc modules/DP-CoreModules/lib/DP/CoreModules/Plugin.pm from the base directory of the Day Planner tarball or git repo).</p>

<p>If you want to write a plugin, and need some help or pointers, feel free to join the Day Planner irc channel, #dayplanner on irc.freenode.net and I&#8217;ll be glad to help.</p>

<p><strong>Git</strong></p>

<p>As mentioned earlier, Day Planner is now using git instead of subversion. After I learned git I now greatly prefer it over subversion, and have thus moved all of my projects to it. Information on how to use the Day Planner git repo can be found at <a href="http://www.day-planner.org/index.php/development/git">http://www.day-planner.org/index.php/development/git</a>:</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[The happy travels of a postal parcel]]></title>
    <link href="http://blog.zerodogg.org//2009/02/18/the-happy-travels-of-a-postal-parcel/"/>
    <updated>2009-02-18T15:07:33+01:00</updated>
    <id>http://blog.zerodogg.org//2009/02/18/the-happy-travels-of-a-postal-parcel</id>
    <content type="html"><![CDATA[<p>Last year, the 21st of December I had to send in my GF&#8217;s cellphone for repairs (bought online), incredibly enough the repairs went smoothly and fast, and on the 29th of December it was shipped back to us, using the Norwegian postal system. Little did we know that it wanted to go on a round trip around the southern part of Norway. This is its story.</p>

<p>29.12.08 - Sent from <em>Drammen</em>, Norway<br />
29.12.08 - Arrived at a terminal in <em>Oslo</em><br />
30.12.08 - Arrived at a terminal in <em>Stavanger</em><br />
31.12.08 - Arrived at a terminal in <em>Haugesund</em><br />
02.01.09 - Beep! Still in <em>Haugesund</em>, and the post office realizes that we have moved and that we have bought a service to forward our mail to our new address<br />
02.01.09 - Arrived in <em>Stavanger</em>. Gah! That&#8217;s the wrong way!<br />
05.01.09 - Registered at a terminal in <em>Bergen</em>. Yay! It&#8217;s getting close!<br />
06.01.09 - Arrived at our local post office in <em>Bergen</em>. Hurray.<br /></p>

<p>&#8230;However, they never sent us any packing slip, and we didn&#8217;t have the tracking number so we didn&#8217;t know.</p>

<p>16.01.09 - Beep! Still in <em>Bergen</em>, and the post office realizes&#8230;something and decides to ship it somewhere else.<br />
16.01.09 - Registered at a terminal in <em>Bergen</em><br />
19.01.09 - Registered at a terminal in <em>Stavanger</em>?!<br />
20.01.09 - Arrived at a post office in <em>Haugesund</em>&#8230;again<br />
31.01.09 - Beep! Still in <em>Haugesund</em>, and the post office realizes, once again that we have moved and that we STILL have purchased the service to forward it to our new address.<br />
02.02.09 - Registered at a terminal in <em>Stavanger</em>&#8230;yet again<br />
03.02.09 - Registered at a terminal in <em>Bergen</em><br />
04.02.09 - Arrived at our local post office in <em>Bergen</em>&#8230;again. Hurray!<br /></p>

<p>&#8230;But they STILL hasn&#8217;t sent us any packing slip stating that the package has arrived and that we need to pick it up.
We contact the retailer, which contacts the repair shop, which provides the information that it is here! At our local post office!
So we go to our local post office, I present my ID and that there&#8217;s a package for me, aaand&#8230; they can&#8217;t find it. We go home and yet again mail the retailer, which contacts the repair shop which then gets hold of the tracking number.
Armed with this brand new information, we head to the post office again&#8230;</p>

<p>18.02.09 - We get the package.</p>

<p>And no, they still haven&#8217;t provided a packing slip.</p>

<p>This is true Norwegian efficiency.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Blogging for LGP]]></title>
    <link href="http://blog.zerodogg.org//2009/02/13/blogging-for-lgp/"/>
    <updated>2009-02-13T14:10:05+01:00</updated>
    <id>http://blog.zerodogg.org//2009/02/13/blogging-for-lgp</id>
    <content type="html"><![CDATA[<p>I&#8217;ve just written my first blog post for <a href="http://www.linuxgamepublishing.com/">Linux Game Publishing</a> on the new <a href="http://blog.linuxgamepublishing.com/">LGP blog</a>.</p>

<p>The post is about the <a href="http://blog.linuxgamepublishing.com/?p=65">LGP community</a>. You can head over to the <a href="http://blog.linuxgamepublishing.com/?p=65">LGP blog</a> to read it.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[SWEC future plans]]></title>
    <link href="http://blog.zerodogg.org//2009/02/09/swec-future-plans/"/>
    <updated>2009-02-09T22:06:33+01:00</updated>
    <id>http://blog.zerodogg.org//2009/02/09/swec-future-plans</id>
    <content type="html"><![CDATA[<p>I&#8217;ve got some plans for <a href="http://random.zerodogg.org/swec">SWEC</a> in the future. One of its primary limitations at the time is that it can&#8217;t really do advanced tests using things like POST or specific pattern matching. So I&#8217;m planning a simple command-based file format where you can define advanced checks for sites, to compliment the already existing fully-automated checks.</p>

<p>The basic syntax will be something like this (any input is welcome):</p>

<pre><code>URL http://...
GET
MATCH /regex/ or STRING
RUN_CHECKS

URL http://
POST 'SOME_POSTDATA'
MATCH /regex/ or STRING
[My regex] MATCH /regex/
[String equality] MATCH STRING
RUN_CHECKS

RUN_MAIN
</code></pre>

<p>Here any URL statement defines a new check, where all previous data is dropped. Each section can have a <em>POST</em> or <em>GET</em> statement, and then any number of <em>MATCH</em> statements, as well as a <em>RUN_CHECKS</em> statement. If any <em>MATCH</em> statement fails (ie. the regex doesn&#8217;t match, or the result isn&#8217;t equal to <em>STRING</em>) then it will skip the remaining tests and skip ahead to the next <em>URL</em> or <em>RUN_MAIN</em> statement.</p>

<p><em>MATCH</em> is obvious, it runs a test on the entire content to see if it matches a regex, or equals a string.
<em>RUN_CHECKS</em> would start the standard (SDF-based) SWEC checks on the returned data.
<em>RUN_MAIN</em> would start the main SWEC mode
<em>[SOMETHING] MATCH</em> would create a named match, so the content within [ ] would be the returned error if it doesn&#8217;t match, instead of something generic like &#8220;failed to match /regex/&#8221;.</p>

<p>Other commands I&#8217;ve thought of that I might or might not want to do include one to clean the cookiejar, so that tests can be performed on how a page acts when cookies are missing, and a way to add custom skip filters based upon for instance the URL.</p>

<p>THese are just random ideas and plans that I&#8217;ve got at the moment, I haven&#8217;t begone coding it yet, but it&#8217;s definetely something I&#8217;m going to do at some point. I&#8217;ll welcome any input if you have any.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Simply checking my web]]></title>
    <link href="http://blog.zerodogg.org//2009/02/02/simply-checking-my-web/"/>
    <updated>2009-02-02T11:31:57+01:00</updated>
    <id>http://blog.zerodogg.org//2009/02/02/simply-checking-my-web</id>
    <content type="html"><![CDATA[<p>I&#8217;ve been doing some web development lately, and the old question of testing has of course come up (and some might say, of course I had to roll my own solution).</p>

<p>I wanted a simple way to sanity check a site, to ensure that my article changes didn&#8217;t suddenly break comments on images (lagacy apps are strange beasts). So I ended up writing <a href="http://random.zerodogg.org/swec">SWEC, the simple web error checker</a>. It&#8217;s a basic app that goes through all links in a site (or &#8220;webapp&#8221;) as long as those are present in the HTML (ie. it doesn&#8217;t run any JS, so its use in JS/AJAX/AJAJ-heavy webapps can be somewhat limited). It parses all pages it downloads, looking for known errors and then reports those. For instance, if you run it on a site based on Catalyst (perl) and catalyst crashes with its standard backtrace, SWEC will return which page it happened on, which page referenced it and a quick line about what happened. Ie. if it&#8217;s an exception it&#8217;ll say &#8220;Exception in Catalyst controller&#8221;.</p>

<p>It uses a very simple file format for writing tests (which is well documented in SWEC&#8217;s manpage). It has several different types of tests, but the most common one looks something like this:</p>

<pre><code>[SWEC_CATALYST_CONTROLLER_EXCEPTION]
type = regexs
check = Caught exception in.*Controller.*Request.*Catalyst
error = Exception in Catalyst controller
sortindex = 11
</code></pre>

<p>What&#8217;s between the brackets [ ] is the name of the test. All tests that are shiped with SWEC are prefixed with SWEC_.
The type defines which &#8220;type&#8221; of test it is. This one is &#8220;regexs&#8221; which is a &#8216;smart&#8217; regex, a standard perl regex that swec modifies during runtime to easier match HTML. The check is in this case a normal perl regex that is applied to the entire html document. As the type is regexs, swec will modify the regex to this during runtime: `Caught(\s+|&nbsp;|&lt;[<sup>>]+>)+exception(\s+|&nbsp;|&lt;[<sup>>]+>)+in.<em>Request.</em>Catalyst</sup></sup></p>

<p>The error is the string that will be returned, and the sortindex is used for prioritizing tests, the lower the better (bundled tests will always be positive, so one only needs to give tests a negative index to ensure they will be run before bundled ones).</p>

<p>By default the bundled tests (<code>default.sdf</code>) and the user-specific rc file <code>~/.swecrc</code> will be loaded. The user-specific one can disable bundled ones easily, and you can disable them on the command line on an individual basis.</p>

<p>SWEC supports sessions, where SWEC remembers previously checked URLs, and previous errors and can then either check pages that used to have errors before the others, or only report &#8216;new&#8217; errors that did not exist before. This will also remember all settings that you set so you don&#8217;t have to type it every time (although it&#8217;ll allow you to do that as well). It has cookie support so it will run just fine as a logged-in user, though you probably don&#8217;t want to run it on a live database, but rather a test one, as it&#8217;ll click on any link it sees (with a few exceptions, it tries to avoid &#8216;logout&#8217; and &#8216;delete&#8217; links, additions to the exceptions list is welcome).</p>

<p>It&#8217;s GPLv3, so feel free to hack your own things into it. I&#8217;ll accept patches for the app itself, as well as new tests to be bundled. As long as they are either specific to a language, web server or framework, I&#8217;ll happily add more bundled checks (or fixes to existing ones), however I will try to avoid app-specific checks as that might just get a bit too much.</p>

<p>Happy hacking</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Sacred: Gold announced for Linux]]></title>
    <link href="http://blog.zerodogg.org//2008/05/14/sacred-gold-announced-for-linux/"/>
    <updated>2008-05-14T21:22:55+02:00</updated>
    <id>http://blog.zerodogg.org//2008/05/14/sacred-gold-announced-for-linux</id>
    <content type="html"><![CDATA[<p>The <a href="http://blog.zerodogg.org/2008/05/03/new-linux-game/">new Linux game</a> turned out to be <a href="http://www.linuxgamepublishing.com/info.php?id=sacred&amp;">Sacred: Gold</a> an action-RPG similar to Blizzard&#8217;s Diablo 2. The package includes the original <a href="http://en.wikipedia.org/wiki/Sacred_(video_game">Sacred</a>), a free (official) expansion pack called Sacred Plus and the <a href="http://en.wikipedia.org/wiki/Sacred_Underworld">Sacred: Underworld</a> expansion pack.</p>

<p>I for one can&#8217;t wait for this port to be released.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[New Linux Game]]></title>
    <link href="http://blog.zerodogg.org//2008/05/03/new-linux-game/"/>
    <updated>2008-05-03T19:00:42+02:00</updated>
    <id>http://blog.zerodogg.org//2008/05/03/new-linux-game</id>
    <content type="html"><![CDATA[<p><a href="http://www.linuxgamepublishing.com/">Linux Game Publishing</a> has announced a competition where one can win the <em>first</em> copy of their new unnannounced game for Linux.</p>

<p>The winner will be the first person to guess which game it is, based upon the slowly revealing image on <a href="http://competition.linuxgamepublishing.com/">http://competition.linuxgamepublishing.com/</a>.</p>

<p>The chance to know what new game is coming out for Linux <em>and</em> the chance to win the first copy of it produced. Yay :).</p>

<p>If you want Linux games already released, head to <a href="http://www.tuxgames.com/index.cgi?referrer=zero_dogg">TuxGames</a>. (Yes that&#8217;s my referral link ;)</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Day Planner 0.9, and looking forward]]></title>
    <link href="http://blog.zerodogg.org//2008/05/03/day-planner-09-and-looking-forward/"/>
    <updated>2008-05-03T15:20:09+02:00</updated>
    <id>http://blog.zerodogg.org//2008/05/03/day-planner-09-and-looking-forward</id>
    <content type="html"><![CDATA[<p><a href="http://www.day-planner.org">Day Planner</a> 0.9 has been released. It is available for download as a <a href="http://www.day-planner.org/index.php/download/mandriva">Mandriva RPM</a>, <a href="http://www.day-planner.org/index.php/download/ubuntu">Ubuntu deb</a>, <a href="http://www.day-planner.org/index.php/download/debian">Debian deb</a>, <a href="http://www.day-planner.org/index.php/download/gnulinux">generic installer</a> and <a href="http://www.day-planner.org/index.php/download/source">source tarball</a>.</p>

<p>The release focused primarily on fixes and cleanups. A bunch of minor bugs were fixed, and I rewrote most of the iCalendar back-end. It should be faster now and preserves files better than it used to.</p>

<p>This release includes a dummy maemo interface. It can currently fully display a Day Planner calendar, and has a UI quite similar to the desktop edition. However, it can not edit or add any events, and is as such not as useful as it might have been. The plan is for the maemo port to be ready for 0.11.</p>

<p>0.10 will (among other things) feature a new HTML exporting module (which has been in the works for quite a while), a cleaner, object-oriented version of the add/edit event windows (to simplify their use and maintainance. The current code that handles it is a bit ugly).</p>

<p>The major user-facing change will be the addition of a GUI for calendar subscriptions. 0.9 includes support for them (though it isn&#8217;t really announced because the feature isn&#8217;t ready), but one has to manually edit the config file.</p>
]]></content>
  </entry>
  
</feed>
