Morphex's blogologue (Life, technology, music, politics, business, mental health and more)

This is the blog of Morten W. Petersen, aka. morphex in various places. I blog about my life, and what I find interesting and/or important. This is a personal blog without any editor or a lot of oversight so treat it as such. :)

My email is

An OGG/Vorbis player, implemented in Javascript.

My Kiva bragging page
My shared (open source) code on GitHub

Morphex's Blogodex


Zope hosting by Nidelven IT

Morten Petersen on Linkedin

Morten Petersen on Facebook

Morten Petersen on SoundCloud

Morten Petersen on MixCloud

Blogologue on Twitter

Older entries

Atom - Subscribe - Categories

An OGG/Vorbis player, implemented in Javascript

So, I've had a productive week(end), and after some fiddling over the last couple of months, I've managed to create a Javascript demuxer/decoder of OGG/Vorbis files. :)

It's located here:

Long story short, it runs in some browsers, as mentioned on the page. I think this is very cool, and it is nice to see that I've managed to make some practical use of the C programming I've been dabbling with the last couple of years.

[Permalink] [By morphex] [Web (Atom feed)] [16 Oct 08:40 Europe/Oslo]

Taking a look at SASS, Compass & Zen Grid

OK, so a couple of days ago I got the idea that I should create a new personal website, which syndicates information from various sources into one channel, or page. That is, all my Youtube stuff, Tweets, stuff posted on SoundCloud, Instagram and so on.

Now, I've been using Python, Zope and Plone for many years, in work projects as well as personal projects. This time, I was thinking of creating something very simple, maybe even static HTML, Javascript and CSS files. Well, as for the static part, I think it is a good idea. The process for creating those static files could be done in any way though.

So I started looking at responsive design, and having a framework that delivers a lot seemed like a good idea. I ended up choosing Zen Grid because it felt right, a Ruby- and Compass-based framework for creating grid-based layouts. Ruby is a programming language, and Compass is a framework for creating CSS. I got Ruby installed, and got SASS, Compass and Zen-Grid installed using gem, an easy enough process, typing 'gem install sass', 'gem install compass', 'gem install zen-grid'.

OK, everything installed - fine. Now I had to create a SASS/Compass project, and the 'compass create <projectname>' command handled that. Creating a project creates some files, using the find command shows which files are present in my project right now:

morphex@infernal-love:~/apache/stats/tester$ find .


The sass directory contains the SASS files which will be compiled into the CSS files in the stylesheets directory. Now, first thing is first, and that's the web page. It is available here:

If you look at the source of that file, you can see it's an example copied from the Zen Grid reference, with the E field commented out. This is because I saw the E field being moved down as content was being added in rows to the B field. I couldn't see any need to go beyond the D so it was just easy to remove it and don't have any headaches trying to figure things out.

The CSS file that gives this page its layout and colours is here:

And the SASS file that generated that CSS is here:

It's all fairly straightforward, and it is a nice simple way to create a layout on a web page.

A final note on these files, config.rb should contain

  require 'zen-grids'

to make all of this work, like my one does:

For my part, I'm thinking it could be fun to create some tools in Python that pulls everything together, at least something that can generate HTML with information from all the different sites I post content to. It's easy to start over-engineering on projects like this, but maybe I'll also wrap Ruby, SASS, Compass etc. in a Python package to make these features easily available for Python. As well as look at including Zope's page template package to easily create templates.

Oh well, I'll get back to progress on all of this later. Tata. :)

[Permalink] [By morphex] [Web (Atom feed)] [04 Dec 17:29 Europe/Oslo]

I'd like to see that as well;cid=2400...

I'm sure a lot of people have had that thought before.

[Permalink] [By morphex] [Web (Atom feed)] [30 Jun 22:22 Europe/Oslo]

Don't drink (and get very drunk) and do websites

I'm sitting here sipping some Baileys and thinking to myself - "this is good stuff." So I thought I'd visit the Baileys website ( and have a look.

First I get asked where I am and what my birth date. Fair enough, I guess they have to do this stuff for legal reasons. I enter Norway, 10th of May 1980 click on "remember" and enter. Then I get a page which says "You're not authorized to bla bla." That's what the fuck #1.

So I enter and voilà, the website shows up. I see some flash icons (I have flash blocker installed, thank god) and select to view the flash things since obviously the site depends on it. I click on a "link" and once more, the flash symbols appear. That's what the fuck #2.

What is it with these brand/media sites and having flash? Can they not create a website that makes *subtle* use of flash? I mean, what the fuck? ;)

[Later..] Aha. Just got an idea. Maybe the flash blocker should have an "enable flash for this website" thing? It does have a whitelist, but it is kinda hard to get at. Hmm.

[Permalink] [By morphex] [Web (Atom feed)] [08 Feb 01:41 Europe/Oslo]


I'm sitting here tailing my logfile, just idling waiting for something to happen.

It would be cool to see who's visiting the site, just have some sort of feed updating with visitor URLs or somesuch - with a link to the visitors webpage. You can have people reading your blog and linking to it, but not everyone is a blogger.

An X-visitor header could be something...

[Permalink] [By morphex] [Web (Atom feed)] [17 Jan 08:30 Europe/Oslo]

How about that, Flash 9 for Linux

Nice to see that version 9 of Flash is available for Linux. It sounds like it even supports esd so sound is working nicely too, even if I've got other things playing.

How cool.

[Permalink] [By morphex] [Web (Atom feed)] [17 Jan 06:09 Europe/Oslo]