2011w23

myConf

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.

renameutils

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

wallpaper-switcher.sh

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:

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

Links

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

Tags: , , , , , , , , , , ,

4 Responses to “2011w23”

  1. Woo, thanks for the renameutils and Vim tips! You rock! :D

    BTW, have you already subscribed to the VimCast — it’s a great source to learn Vim :]

  2. Patrik says:

    Hiya and thank you for commenting :)

    I don’t know about rocking, I just try to share various things I’ve found useful in the hopes that someone else will find it useful too, like now :D

    I actually haven’t subscribed to VimCast, but will seek it out and do that now, thank you for the tip :)

    ps. I heard from hesa that you arranged a great meeting in ?Slovenia? this ?weekend? In any case, hesa sounded very pleased, so you rock too! :D ds.

  3. Oooooh, VimCasts (sorry, forgot the trailing “s”) is a great source of info!

    Yeah, the FSFE GA was in Ljubljana, Slovenia this week and finished just two days ago. It was pretty cool to have all of them FSFE GA members over and see them in person. Hesa and the rest are awesome :D

    I dunno about me rocking …I’ve already made a list of stuff I would do better next time :P

  4. Patrik says:

    Thanks for the link (although I had already googled my way to it, but thank you none the less) :)

    Doh! My memory really sucks, I am pretty sure hesa told me before he went that it was a GA meeting and it slipped my mind. I’d go so far as to say that FSFE is awesome :)

    Well then you absolutely rock! I have a list of improvements to implement for my part in this years FSCONS, so I guess all people who continually improve themselves rock :D