Abacus

abacus is a simple program that sits in the background and counts every key that you press. It is NOT a keylogger! No information about the keys is stored, only their count.

The daemon itself only counts keypresses and saves the counter to a SQLite3 database. A Python script can be then used to generate the chart (through gnuplot).

abacus was a nice and funny hack, but I no longer feel like working on it. It could be improved in many ways, but I will have to leave that as an exercise for the reader. The Makefile is probably broken, no logging is done, installation is Debian-only, the chart-generating script is not user-friendly at all, documentation doesn’t exist…

Installation & Usage

The program is compiled and installed by the standard make && su -c 'make install'. If your are on a Debian-like distro, a System V-style script will be created in /etc/init.d and proper links added to /etc/rc.X.

Charts are generated by a Python script called abacus-gen-chart.py that is a part of the package. You can either run it without arguments, or supply a starting and ending date. See the source code for details, I hate to write documentation :-)

Requirements

Download

The current version is 1.1. Licensed under the terms of GPLv3.

Example Chart

abacus-generated chart example

autoEQ

autoEQ is a handy script for the Amarok 1.x music player. It monitors what tracks you listen to and automatically selects equalizer presets according to your own rules. The rules are specified using regular expressions and may range from dead simple to bloody complex. See the configuration for a more detailed rule description and some examples.

autoEQ does not work with Amarok 2 because it no longer uses the DCOP interface.

Requirements

Download

The current version is 1.0. Licensed under the terms of The MIT License.

Example Configuration

(also included in the package)

# Activate "Nightwish Low Bass" when the artist is "Nightwish" and the track
# title begins with "Escapist".
Nightwish Low Bass
artist:^Nightwish$
title:^Escapist

# Activate "Nightwish" for all other tracks by "Nightwish".
Nightwish
artist:^Nightwish$

# Activate "Live" for "The Life Burns Tour" album by "Apocalyptica"
Live
artist:^Apocalyptica$
album:^The Life Burns Tour$

# Activate "Dance" for the 2005 version of "Wall of Sound" by "Armin van Buuren"
Dance
artist:^Armin van Buuren$
title:^Wall of Sound
year:^2005$

# Anything else doesn't require the equalizer.
# This is a rule with no conditions. The special name "<disabled>" switches
# the equalizer off instead of setting any presets.
<disabled>

daemonēs

dæmonēs (the Latin for daemons) is a small GTK utility that sits in your GNOME system tray (notification area) and allows you to start and stop daemons (web server, database server, …) with a few clicks. You can configure what daemons will show up in the menu and set the commands needed to start/stop them.

daemones pop-up menu daemones status icon tooltip

Raison d’être: for developing and testing web applications, I usually need to run a web server and one or two database servers. However, I don’t want these behemoths to hog my laptop’s resources all the time, so I start them only when they are needed.

Installation & Usage

  1. Put the daemones.py script somewhere on your $PATH (~/bin, for instance).
  2. Edit the included example-config file to create your configuration and save it as ~/.daemones.
  3. Optional: you may change the config file location and the status icon by editing the CONFIG and ICON constants at the top of daemones.py.
  4. Ensure that daemones.py is started when you log in to GNOME. Adding it to System -> Preferences -> Startup Applications is a good choice.

You will probably need to ensure proper privilege escalation to start and stop system daemons. See the mini-HOWTO privilege-escalation (included in the package) for tips.

Requirements

Download

The current version is 1.0. Licensed under the terms of The MIT License.

Example Configuration

(also included in the package)

# Each daemon definition takes four lines. Definitions are separated by blank lines.
# The format is fixed:
# Line 1: Human-readable name of the daemon.
# Line 2: Command to start the daemon (probably something like "sudo /etc/init.d/foo start").
# Line 3: Command to stop the daemon (probably something like "sudo /etc/init.d/foo stop").
# Line 4: Path to the PID file of the daemon. Its existence determines whether the daemon is running or not.

Apache
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop
/var/run/apache2.pid

MySQL
sudo /etc/init.d/mysql start
sudo /etc/init.d/mysql stop
/var/run/mysqld/mysqld.pid

PostgreSQL 8.3
sudo /etc/init.d/postgresql-8.3 start
sudo /etc/init.d/postgresql-8.3 stop
/var/run/postgresql/8.3-main.pid

γαλήνη

γαλήνη (galene) is a very simple text editor. It clears away all distractions and makes you focus on the writing itself. It can have only one file open and displays it full screen. There are no buttons or user interface. Just you and your text.

Screenshot of γαλήνη.

Γαλήνη, or Galene, was a personification of calm sea in the ancient Greek mythology. That’s how I like the blank sheet before me: calm, empty, waiting for words that will give it meaning.

Syntax highlighting is supported as well as a few keyboard shortcuts. There is a very limited configuration available at the top of galene.py. You may want to change your font there (a beautiful LaTeX serif is set by default).

Keyboard Shortcuts

Ctrl+O: open a file; Ctrl+S: save the current file; Shift+Ctrl+S: save as…

I use the editor primarily for HTML, which is why it supports the following shortcuts: Ctrl+Alt+e: wrap the current selection by the <em> tag; Ctrl+Alt+g: wrap the current selection by the <strong> tag; Ctrl+Alt+p: wrap the current selection by the <p> tag; Ctrl+Alt+c: comment out the current selection; Ctrl+space: insert a non-breakable space (&nbsp;).

Requirements

Download

The current version is i. Licensed under the terms of The MIT License.

tcviz

tcviz is a script that can visualize your Linux traffic control (TC) configurations. Qdiscs, classes, filters, you name it. The program has been first introduced on my blog. Please read the Visualizing Linux Traffic Control Setup blogpost for more information.

Requirements

Download

The current version is 1.2. Licensed under the terms of The MIT License.

Examples

tcviz is able to turn something like this:

$ tc qdisc show dev eth0
qdisc htb 1: root r2q 10 default 10 direct_packets_stat 0
qdisc sfq 10: parent 1:10 limit 127p quantum 1514b perturb 10sec
qdisc sfq 11: parent 1:11 limit 127p quantum 1514b perturb 10sec
qdisc sfq 19: parent 1:19 limit 127p quantum 1514b perturb 10sec
qdisc sfq 31: parent 1:31 limit 127p quantum 1514b perturb 10sec
$ tc class show dev eth0
class htb 1:11 parent 1:1 leaf 11: prio 0 rate 256000bit ceil 256000bit burst 15Kb cburst 1599b
class htb 1:10 parent 1:1 leaf 10: prio 0 rate 128000bit ceil 128000bit burst 15Kb cburst 1599b
class htb 1:1 root rate 10000Kbit ceil 10000Kbit burst 15Kb cburst 1600b
class htb 1:31 parent 1:1 leaf 31: prio 0 rate 128000bit ceil 128000bit burst 15Kb cburst 1599b
class htb 1:19 parent 1:1 leaf 19: prio 0 rate 512000bit ceil 512000bit burst 15Kb cburst 1599b
$ tc filter show dev eth0
filter parent 1: protocol ip pref 1 fw
filter parent 1: protocol ip pref 1 fw handle 0x1 classid 1:11
filter parent 1: protocol ip pref 1 fw handle 0x9 classid 1:19
filter parent 1: protocol ip pref 1 fw handle 0x15 classid 1:31

into something like this:

tcviz-generated graph example

significātiō

This kludge can do something whenever a certain keyboard group is set. By default, it changes the color of Compiz window shadows. Make changes to actions.c if you want a different form of notification.

The number of the keyboard group is specified as the first (and only) argument.

Windows with the US layout active Windows with the Czech layout active

significātiō (Latin) – indication, sign.

Download

Licensed under the terms of The MIT License.

Vita C++

This microlibrary (currently only two published classes) has been first introduced on my blog. Please read these two articles for more information:

  1. Vita::string – a slightly better C++ string
  2. Vita::config – reading config files

Documentation

Library documentation is contained in the downloadable archives. It is also available for on-line browsing.

Download

The current version is 2.0. Licensed under the terms of The MIT License.