Posts Tagged ‘SQLite3’

My Software Stack 2011 edition

Saturday, December 31st, 2011

I realize that I haven’t written my customary “software stack” post for this year yet. But hey, from where I’m sitting, I still have … 36 minutes to spare ;)

I’ll be using the same categories as last year; system, communications, web, development, office suite, server, organization, and entertainment.


The OS of choice is still Archlinux, my window manager is still wmii, my terminal emulator is rxvt-unicode, upgraded by also installing urxvt-tabbedex.

My shell is still bash, my cron daemon is still fcron, and my network manager is wicd.

To this configuration I’ve added the terminal multiplexer tmux, and have lately found out just how useful mc can be. Oh, and qmv from the renameutils package is now a given part of the stack.


Not much change here, Thunderbird for email, Pidgin for instant messaging, irssi for IRC.

Heybuddy has been replaced by identicurse as my micro-blogging ( client. Heybuddy is very nice, but I can use identicurse from the commandline, and it has vim-like bindings.

For Pidgin I use OTR to encrypt conversations. For Thunderbird I use the enigmail addon along with GnuPG.

This means that Thunderbird still hasn’t been replaced by the “mutt-stack” (mutt, msmtp, offlineimap and mairix) and this is mostly due to me not having the energy to learn how to configure mutt.

I also considered trying to replace Pidgin with irssi and bitlbee but Pidgin + OTR works so well, and I have no idea about how well OTR works with bitlbee/irssi (well, actually, I’ve found irssi + OTR to be flaky at best.


Not much changed here either, Firefox dominates, and I haven’t looked further into uzbl although that is still on the TODO list, for some day.

I do some times also use w3m, elinks, wget, curl and perl-libwww.

My Firefox is customized with NoScript, RequestPolicy, some other stuff, and Pentadactyl.

Privoxy is nowadays also part of the loadout, to filter out ads and other undesirable web “resources”.


In this category there has actually been some changes:

  • gvim has been completely dropped
  • eclipse has been dropped, using vim instead
  • mercurial has been replaced by git

Thanks in no small part to my job, I have gotten more intimate knowledge of awk and expect, as well as beginning to learn Perl.

I still do some Python hacking, a whole lot of shell scripting, and for many of these hacks, SQLite is a faithful companion.

Doh! I completely forgot that I’ve been dabbling around with Erlang as well, and that mscgen has been immensely helpful in helping me visualize communication paths between various modules.

“Office suite”

I still use LaTeX for PDF creation (sorry hook, still haven’t gotten around to checking out ConTeXt), I haven’t really used sc at all, it was just too hard to learn the controls, and I had too few spreadsheets in need of creating. I use qalculate almost on a weekly basis, but for shell scripts I’ve started using bc instead.

A potential replacement for sc could be teapot, but again, I usually don’t create spreadsheets…


Since I’ve dropped mercurial, and since the mercurial-server package suddenly stopped working after a system update, I couldn’t be bothered to fix it, and it is now dropped.

screen and irssi is of course always a winning combination.

nginx and uwsgi has not been used to any extent, I haven’t tried setting up a VPN service, but I have a couple of ideas for the coming year (mumble, some VPN service, some nginx + Python/Perl thingies, bitlbee) and maybe replace the Ubuntu installation with Debian.


I still use both vimwiki and vim outliner, and my Important Dates Notifier script.

Still no TaskJuggler, and I haven’t gotten much use out of abook.

remind has completely replaced when, while I haven’t gotten any use what so ever out of wyrd.


For consuming stuff I use evince (PDF), mplayer (video), while for music, moc has had to step down from the throne, to leave place for mpd and ncmpcpp.

eog along with gthumb (replacing geeqie) handles viewing images.

For manipulation/creation needs I use LaTeX, or possibly Scribus, ffmpeg, audacity, imagemagick, inkscape, and gimp.

Bonus: Security

I thought I’d add another category, security, since I finally have something worthwhile to report here.

I’ve begun encrypting selected parts of my hard drive (mostly my email directory) using EncFS, and I use my passtore script for password management.

And sometimes (this was mostly relevant for when debugging passtore after having begun actively using it) when I have a sensitive file which I for a session need to store on the hard drive, in clear text, I use quixand to create an encrypted directory with a session key only stored in RAM. So once the session has ended, there is little chance of retrieving the key and decrypting the encrypted directory.

Ending notes

That’s about it. Some new stuff, mostly old stuff, only a few things getting kicked off the list. My stack is pretty stable for now. I wonder what cool stuff I will find in 2012 :D



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, 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

My software stack revisited – “Office suite”

Saturday, December 25th, 2010

Although there are free (as in freedom) “office suites” (LibreOffice) I don’t care much for them. Having said that, I do have LibreOffice installed, but that is out of the need to be able to read attachments people send me.

Instead, I have collected a few applications which perform similar tasks for me:


For text editing, vim obviously plays a part, although for writing (not editing) longer chunks of text I use PyRoom.

So what I end up with are plaintext files, which is not always the optimal option presentationally. This is where LaTeX comes into play.

All of a sudden, I have snazzy-looking PDFs instead of plaintext :D


Historically I haven’t used spreadsheets all that much, but as of late that has started to change. Calc ( did the trick, so did gnumeric, but I like stuff that is light on resources. Lighter than gnumeric…

And that is where sc comes into play. It has its shortcomings, for instance, when saving to csv it saves the current value of any formula, instead of the formula itself.


There is a LaTeX class called Beamer, which, when compiled, creates a PDF suitable for presentations.

Of course, depending on the complexity of the presentation, a simple PDF (as created by LaTeX without Beamer) could do the trick, but Beamer adds elegance to the simplicity of an ordinary PDF.

There are two applications which comes to mind for presenting a PDF-based presentation: Evince and Impress!ve (which shouldn’t be confused with Impress.

Evince is an ordinary PDF-viewer, and Impress!ve is a Python-powered presentation tool with support for OpenGL and some rather nice effects and features.


I don’t particularly like Access, and I have never tried’s Base, but the idea of having a database contained in a single file always intrigued me, and for smaller applications it kind of begins to make sense.

Now, if we take that idea, of a database contained in a file, with a small library through which you interact with the database file, and we also think “lightweight”, we… well at least I did, end up with SQLite3.

The SQLite3 library has a CLI which means that even my shell scripts can interact with the database. And that is pretty frakkin cool.


Finally, what office suite would be complete without a calculator?

True, I do most of my calculations in a nearby ipython-terminal, but ever since I discovered qalculate, and the CLI version qalc, it has stuck with me.

Why? Because you can ask it to convert between currencies like this:

$ qalc \$200 to SEK

Obviously this is only useful if you first let it fetch up to date exchange-rates from the web, but there is a setting for allowing it to do that automatically at the beginning of every program start.

And that’s about it. Next post will be about communication tools.