Use the reference for a list of all terms discussed on Unix Revelations. And here a list of all Unix Revelations on a single page.
When you log slow queries or queries without indexes in MySQL, you should regularly rotate the file to save disk space. Quite some suggestions on the internet involve complex scripts which do this, other suggestions discuss FreeBSD's log rotator newsyslog. However, most of the descriptions about newsyslog appeared wrong to me, because no PID file was specified for the rule. This means that a SIGHUP is sent to the syslog daemon instead of the mysqld process, which is undesired.
tmux is a terminal multiplexer, just like screen(1). However, tmux is actively maintained and is in my opinion much better. Due to these developments, it could happen that something stops working or becomes broken from one version to another. The upgrade from version 1.2 to 1.3 caused that the commands down-pane and up-pane were no longer working.
Technically speaking, this is not strictly a Unix Revelation. Still, to me it's useful enough to note this down.
We all know Java runs in a virtual machine, and assigns itself in 80% of the cases too little memory to do some real work. Result? Well, this:
Sun gave us the -Xmx flag to increase the heap size (and -Xms to increase the stack size).
This works nicely from the commandline, the next challenge was to do something similar from an R environment. Using RWeka, which in turn depends on rJava, I found myself hitting the limit every time (which defaults to 512 MB).
Again, this is primarily a note-to-self. My normal internet connection is not always that stable, so I have to fallback to alternatives when things are suboptimal (massive packet loss up to 100%).
Before, I could use my Sony Ericsson C902 for tethering. With Bluetooth and a lot of PPP magic I barely understand, I was able to call my phone's modem and access the internet.
I keep forgetting this, so I'd better jot it down here once and for all. To add a Git remote repository, accessible through SSH with a different port than 22, execute:
So this adds a remote repository behind port 2222 of the host, immediately followed by the remote path of the repository. The ssh:// part is crucial and forgetting this part has cost already some minutes of my life.
For KDE development, I work with a separate user. However, when you invoke su - kde-devel and run an X11 application, you'll get nasty errors like:
or
There are several solutions for this.
A couple of days ago I came across this excellent tip to download your GMail mail to your computer with IMAP. Before you continue reading here, I assume you read that article first. In this article, the path /path/to/gmail/backup is the path of the local repository, which you configured for offlineimap.
In the comments of that article, I stated that there's a problem with duplicate files. GMail has no real folders, but you can label e-mails. This implies that the same e-mail may possibly end up in more than one folder. When you download all folders, it is likely you store that e-mail multiple times.
An annoying problem arised when using x11vnc as a VNC server on one of my machines. Whenever I connected to it the Shift key did not appear to work from the client. For some people this is no problem because they have no notion about using capitals, but I do care. I tried two clients, both showing the same behavior, so I knew this was a server-side issue. Running xev (package xorg-tools) on the server showed me the desired behavior: the Shift key got captured after all. And Caps-Lock also just works.
One of the Arch Linux systems I maintain is still running KDE 3 from the KDEmod repositories. We're talking about KDE 3.5.10 here. Unfortunately, there's a bug in the audio CD ripping process. When you drag a (virtual) MP3 file/folder from the audiocd:// KIO-slave, it produces only MP3 files with white noise. Unless your audio CD contains white noise only, there's no problem of course, in other cases you might like to fix this.
Sometimes it's handy to checkout a branch based on a point in time.
will not work, because it uses the reflog (which expires after some time).
The trick (as found on Nabble) is to lookup the revision on a certain date and check out that revision. This can be done in a single command: