Posts Tagged ‘FSCONS’


Monday, November 14th, 2011

FSCONS 2011 is now over, but fear not, FSCONS 2012 is only about a year away.

All of the participants; volunteers, speakers and visitors alike, whom I’ve had the pleasure of speaking with had only good things to say.

The overall feeling is that this was the best FSCONS yet. I am inclined to agree—but of course I am biased—due to the very low amount of incidents at all.

There were some, which is to be expected, but nothing really major, and nothing showstopping.

There were some close calls, but—and this is one of the many GREAT things about FSCONS: the visitors—in most of the close calls, visitors stepped up, graciously lending their own equipment and thereby saving the day.

And this is what I love about FSCONS. Everyone participating, no matter who they are, what they do, all bring their very best.

That, and getting to meet people I’ve only otherwise known through emails. :)

Finally, rest assured that I have a list of all the small things I observed to be in need of improvement.


Saturday, November 12th, 2011


That is all for this week. See you all there :)


Sunday, November 6th, 2011


T minus 5 days and counting :D

It’s gonna be great to see all the familiar faces again and hopefully get to know some new people as well.


top (and it’s more colorful sibling htop) can be a great tool for keeping track of processes, and to some extent users, in a system. If, for instance, you’re sharing a system with a couple other people, and the systems starts feeling sluggish, top will help you out by displaying the process id (and the username which started the process) of the process consuming the most CPU cycles.

If you’d rather sort on the processes consuming the most system memory that would be On<ESC> (i.e. “<shift>o” followed by “n” followed by <ESC>)
Note that this is done from inside a running top.

You could even single out a specific user for monitoring with

$ top -u <username>


This one took me a while to figure out… I had this problem during the week, which I for the life of me cannot remember now, but it manifested itself in that my attempts to do

$ echo "$part / $total" | bc

didn’t do the trick as it just truncated the value down to 0.

And the solution to this, which I found at Linux By Examples was rather simply to add a scale command to bc:

$ echo "scale=3; $part / $total" | bc


Named capture groups are great (I already knew of them from Python (Django, but they took me quite some time to hunt down in Perl.


The Geek Stuff has some really great posts about various more or less admin-oriented commands (indeed, when I was in a hurry to learn what I needed from top this week, The Geek Stuff was my primary tutor.


Sunday, October 30th, 2011

Misc tools and other goodies

Another work week, another set of “discoveries”, like less -S, crontab -r and that when you issue a command which in turn uses $EDITOR to launch an appropriate text editor, and you instead of an editor window is greated with vim: no such command, well then perhaps in one of your profile- or config-files for the shell you have a line looking something like this:

EDITOR=`which vim`

Yes, this happened to me at work on a box which only had vi installed.

Pontus also showed me some SSH escape sequences which could come in handy. The first thing to know about them is how to “activate” them, which is done with the tilde-sign (~).

So on my setup, this would mean “AltGr+¨AltGr+¨” followed by a some sequence (? for help, . to close the connection (very good for when the remote server has rebooted, i.e. the ssh session has died, but the terminal never got wind of it, so it just sits there), or C^z to suspend it.)

cp importantFile{,.bak} is a pretty nice pattern as well.

Finally, I found a new (and totally inappropriate but functional) way of using mscgen: to generate staffing schedules.

In this case, being the “tech responsible” at FSCONS, this means scheduling my eight slave^H^H^H^H^Hcamera persons across the four tracks and two days.

Experiences from last year made me divide each day up into two pieces (AM and PM) which makes for sixteen blocks, divided evenly across the eight volunteers (who I am ever greatful to) for a total of two blocks per person.

For that small amount of data, mscgen worked wonders and gave me a wonderful overview :)

As a sidenote, I really should try to post a “my picks” from the FSCONS schedule soon. Yet another TODO to push onto the stack… ;D


A couple of nights ago Pontus told me about an “array shuffling algorithm” (e.g. good for when you have an array representing a deck of cards and want it shuffled) which basically revolves around iterating through the array once, starting at the back of the array, counting down and for each iteration use the loop-counter as the max value for the random number generator so that it always delivers a number (index) which is within the array itself, and then swap places if the index:th place and the loop-counter:th place of the array. That was a fun excercise :)


Sunday, October 16th, 2011

There’s not been a whole lot going on this past week, except for work and more work, but at least I am beginning to feel somewhat productive :-)


FSCONS is now less than a month away, YAY!


And I have started looking into learning Perl. Don’t know how long that will take, don’t really care either, it’s just for fun anyway :-)

Bash webservers (for simple testing)

This if of course nothing for live deployment, but if you don’t want to spend a whole lot of time installing and configuring an entire webserver just for some quick and dirty tests, and then there are some fairly neat-looking scripts. They are untested but doesn’t look like especially sinister constructions.

Random thoughts

I am getting a fair deal of SEO spam in my comments (thank you Akismet for dealing with it) and the only thing that comes to mind is:

IF SEO really works so well, then why do spammers feel the need to… well spam about it?

And especially when they try to link back to their own sites, increasing traffic to… their own sites. Iunno, just seems like a big scam to me.

But then again, my objective for blogging isn’t to get the maximum amount of visitors I can, but to share stuff I find neat, in the hope that it will be useful for someone more than me.



Sunday, August 28th, 2011

Imagemagick, again

There has been quite a lot of hacking using imagemagick this past week, all of it for FSCONS use.

My first hack was to create an image for use in the MyConf site, to visually mark up passed timeslots as, well… passed.

The idea I had was to set a background on that html element which would have “Session has ended” written diagonally from the lower left corner to the upper right.

Greg convinced me that there must be better ways to mark this up which would at the same time not interfer with the readability of those sessions, and we ended up going another way, but this is how to create images with diagonal text anyway:

$ convert -size 400x200 xc:none -fill red -pointsize 40 -gravity center -draw "rotate 337.5 text 0,0 'Session has ended'" tmp.png

This will create a 400px wide by 200px high image, with a transparent background and red text, rotated to lay diagonally across the image, beginning in the southwest corner of the image and ending in the northeast.

The next day Rikard had an idea about using an FSCONS crowd image as background for another image, and have parts of the crowd “bleed through” the overlaying image.

This is of course something one can do in GIMP, iff you have learned how to. Rikard struggled with that, got help from Jonas, but ultimately the result wasn’t good, and he’d have to do it all over again, at which point Jonas had left for the day and he didn’t remember what had been done.

Which got me thinking “this must be doable in imagemagick, and repeatable (i.e. a shell script)”. Of course it was.

It is a two-step process, first you’ll need to prepare the overlaying image, by making parts of it transparent, enabling the background image to bleed through. This is done with:

$ convert overlaying-image.png -transparent black new-image.png

In the above example, the color black in “overlaying-image.png” will be made transparent, and the output saved into “new-image.png”.

For my tests, as I only needed a background image, and as anything would suffice, I had imagemagick create one for me:

$ convert -size 525x525 xc:blue bg.png

This will create an 525*525 pixel image with a blue background color.

With this done, all we need do is to merge the two images (“new-image.png” and “background-image.png”) together:

$ composite -gravity center new-image.png background-image.png resulting-image.png

One little gotcha with this command above: I haven’t tried what happens when I use two differently sized images. I am assuming that things will get cropped.

Media Queries

This Thursday I was introduced to Media Queries, a rather cool technique for having CSS determine (well, I suppose it really is the web browser which does all the work, while CSS is just the container for the rules) which styles to apply, depending on certain browser attributes (such as current width of the window, etc.)

Greg has implemented this in MyConf and it is pretty cool when you shrink your browser window down to about 200 pixels or so, and the page transforms before your eyes.

graphvis and neato

On thing which have bothered me about neato for a long time is that I could never find a way to have the nodes not overlap in the generated image.

There is syntax for how to space out nodes inside the graphviz grammar, and it works… sortof, but I actually found a better way to go about it now.

$ neato -Tpng -o resulting-file.png -Goverlap=false


When I updated the WP Stats plugin this Friday I was “greeted” with the message that I wouldn’t receive any further updates to the stats plugin and that I should get Jetpack instead.

It promised to be great and awesome and connect my blog to the “WP cloud” (whatever that is), but instead of filling me with optimism and making me look forward to that change, all that message managed to do was make me think “ok, I wonder how long before they’re gonna start charging for access to all this Jetpack functionality”.

Automattic is of course free to do so if they feel like it, but I can’t help but feel that it is ass-backwards to have the self-hosted platform, and then try to tie it into that “WP cloud” (whatever that is, again they leave me with more questions than answers)…

The funny thing is that WP Stats was one of the features that I really liked, and which made me hesitant to move somewhere else.

So thanks Automattic… but no thanks. Time to speed up the plans for migrating to fugitive…


Sunday, August 14th, 2011


This week has mostly been allocated to FFKP/FSCONS work. I learnt about “Special Pages” on mediawiki wikis. That was a great find, especially as I could be called upon to administer the FSCONS wiki ;)

Furthermore, I was “volunteered” to draft a staffing proposal (i.e. make an estimate about how many people we need to execute another successful FSCONS).

Scheduling and management is so far from the things I excel at doing—mostly for lack of practice, which in turn stems from me not being interested in any of it—so naturally it didn’t take two minutes from my submission to the mailing list until greg had dutifully heeded my plea to catch as many bugs as possible, but hey, better now than in three months :)

For a short period of time I tried attacking the problem with planner, but I am no friend of project management software, so that struck out. I ended up using LibreOffice Calc, which also gave me some headaches, but did eventually carry me all the way to the present version of the proposal.

What I’ve learnt about Calc:

  • ROUND() will properly round values up and down as expected
  • If you want a function which always rounds upwards, that’s CEILING
  • Parameters for functions are separated not by commas, but by semicolons

What I’ve come up with is that I have 162 hours which needs to be staffed by volunteers. No volunteer should be expected to work more than 8 hours during the conference (which spans from Friday evening, staffing-wise, to Sunday night), which means that we need 21 volunteers.

Other than that we need 1 “room host” per track, that’s 8 hosts, we need 1 camera person per track, another 8 people, and finally we need a senior person from the core team of organizers always in the “command centre”.

We have five of those. 21 + 8 + 8 + 5 = 42. The answer! Yes, I’m a geek ;D

SMS messages in a Nokia N900

razor tried to find a funny sms the other day (which he eventually did) but I couldn’t help thinking that it could have gone faster if we’d known where the messages were stored, and instead searched for specific keywords in that database.

They are stored in an SQLite database in ~/.rtcom-eventlogger/el.db


Placekitten: a service to set cute cats as place holders in your designs. Too funny to resist ;D


how to make the internet not suck (as much)

FuzzyWuzzy: Fuzzy String Matching in Python

Vim recipes


Sunday, June 19th, 2011


I have begun to use {c,d}f<character> to change or delete from the cursor up until (including) <character>.

It has made me a little bit faster in some few edge cases of text-editing, but today (Monday) I found myself in need of doing a couple of manipulations on text up until (NOT including) <character>. helped me find {c,d}t<character>.

Very nice :)

MediaWiki sortable tables

In preparation for FSCONS one of my duties as team leader for the Hardware team is to keep track of all the hardware available to FSCONS (i.e. hardware owned by FFKP) and Jonas felt it would be a good idea to have that list available on a wiki.

When I was done adding the laptops and cameras it kindof bugged me that I’d added the laptops in the “wrong” order (i.e. the serial number column wasn’t ordered).

Luckily this was an easy fix, as one can add class="wikitable sortable" to the table header in the wiki-syntax and it will automagically add the necessary javascript and buttons to make each column sortable.


The “Bump” Challenge aimed at creating a simple(r) way of exchanging public keys and establishing trust, possibly (probably?) using smartphones which are able to sync with the FreedomBox, seems like a rather nice idea.

Personal Wikis

A wiki can be a great tool, and for a while I was maintaining a personal mediawiki installation, just adding stuff I needed from time to time, but never often enough that I could learn it.

Then I stumbled over Zim, which became collateral damage as I got into my “replace as much as possible with a command-line alternative”-phase (this phase hasn’t abated yet ;)) which left me migrating to VimWiki.

I am not likely to replace VimWiki, it works well for me, but sometimes it might not be the right tool for the job. Which is why I am always on the lookout for new stuff.

I already knew about ikiWiki, but at the time I discovered it I didn’t have the time to look further into it. I guess I should change that.

And today I found TiddlyWiki, a wiki self-contained within an html file. Which people have extended for other uses.

SQLite Triggers

SQLite has support for triggers, how cool is that?! And these triggers can be triggered by other triggers! :D


Vim Casts is a Vim screencast resource for learning / improving your knowledge in Vim (thank you for the tip hook).

Tahoe-LAFS (Least Authority File System) is a decentralized fault-tolerant peer-to-peer file system. I can’t really speak about its security, but it looks pretty good, at least on paper.

ZRTP seems to be a pretty cool VoIP encryption protocol, and there seems to be an implementation for Android devices as well.

“Towards a Lifelong Content Management System” is a rather nice, well thought-through blog post on how we might want to change the way we think about content management systems (thanks @mlinksva).



Sunday, June 12th, 2011


This is a technology demonstrator of the FSCONS myConf concept that doesn’t rely on any server-side programming.

It also became my first project under git versioning.

myConf is a concept we’ve (FSCONS) been thinking about implementing since, IIRC, 2009.

Basically it should allow a participant to tailor a personalized conference schedule, instead of having to mark it up in a dead-tree version.

Or so is at least my understanding of the myConf concept.

In short it is a Javascript (jQuery) / JSON-powered site, from which I have now learnt two things:

  • It is as important (if not more so actually) to have a good JSON structure as it is to have a good database design, otherwise it WILL come back and bite you, hard
  • It is actually quite fascinating what one can do with Javascript (at least when a library is used so that you don’t need to even think about platform irregularities)

Expect a public release shortly.

vim foldsearch plugin

I was editing my sudoers file (I still haven’t gotten myself off sudo) and started wondering if there perchance wasn’t a way in vim to hide lines according to some pattern.

The default archlinux sudoers file is full of comments, to the point that it is almost hard to see the uncommented lines.

:g/pattern and :v/pattern only takes you so far, i.e. it shows you the lines, but immediately disappears when trying to edit or move or anything except just looking at it.

Luckily for me other people had already asked the same question, and yet other people had answered it.

Which lead me to the vim foldsearch plugin. Best of all, it is easy to use.

Search for something, i.e.:

/my pattern here

and then use <Leader>fs (I have mapped <Leader> to \ in my config, so for me that would be \fs) and voilà, all the lines not matching the search are folded away.


I am sure I have already written about renameutils, or more likely about qmv, but it is worth repeating. qmv rocks!

wmii is my window-manager, although I am probably running version 3.6 or something (i.e. not 3.9) so this might not be usable for people other than wmii 3.6 users.

Anyway, last Friday I got the idea to write a little script to switch wallpapers for me. Today I sat down and hacked it together:

tmpList="$(ls -l ${HOME}/wallpapers/*.jpg | awk '{ print $NF }')"
randomWallpaper="${tmpList[$(($RANDOM % ${#tmpList[@]}))]}"
ln -fs "$randomWallpaper" "${HOME}/wallpaper.jpg"
exit 0


shunit2 Unit-testing for (Bash) shell scripts, this is so cool :D
Akka for a simple way of writing concurrent applications in Java
Protolol jokes for nerds


Sunday, May 29th, 2011


I have come up with a way to achieve the changes I want, but without introducing sqlite3 as a dependency, and a big part of the solution is to use bash arrays.

Furthermore, I have been thinking about how to, if possible, get timetrack to automagically start a new session when a file in the project is opened.

This won’t help anyone to start the timetracker when thinking about the project, but at least when physically transferring code from brain to hard drive, and the lead I am working off of is inotify.


During this weeks FSCONS meeting jonaso jokingly suggested that I’d try to write an issue tracker in bash. (damn you! ;))

Of course my mind started wandering and although there is no code to back it up, I have a couple of rather interesting ideas about how to pull it off.

For this project, sqlite is the way to go, but I was somewhat worried about concurrent access which I probably shouldn’t be.

My tests indicate (oh yeah, so there exist code, just not any actual issue tracking code) that the sqlite3 library is intelligent enough to lock the file, and thus doesn’t allow concurrent access.

I’ll still need to devise a way of detecting these locks, and have the second script stand in line and try again later, but that should be trivial.


Turning Vim into a modern Python IDE

Learning styles
From what I can gather, I am an assimilator. resistance is futile!

Cheat sheets!

The 9 secret burdens of being a Linux user

Big businesses acting out like this might very well get me to start boycotting them again…

String manipulation in bash

Seemingly nice way of doing HTTP requests in Python