rTorrent is a very efficient BitTorrent client for linux. It has a very small memory footprint, a very customizable configuration file, and exposes it’s internals through XML-RPC. This is convenient to implement 3rd party GUI or web interfaces.
Let’s see how to setup and use XML-RPC to probe rTorrent downloads.
read this entry »
The “modeline” is a common way to set (or override) VIM settings on a file by file basis. Let’s see a few of the key concepts of the VIM modeline.
read this entry »
If you access the internet through a proxy, you need to set up Amarok to use it to enjoy some of its amazing features such as automatic downloading of CD covers or fetching of the lyrics of the song you’re listenning to. Amarok is really a great media player. if you don’t know it you should definitely give it a try !
Setting up proxy parameters for Amarok 1.4 could be a little confusing if you don’t use the full KDE environment. In this post, I’ll explain how to manually edit KDE configuration files to fix proxy settings.
read this entry »
I currently manage all my X10 home automation with MisterHouse which is a fantastic tool but is a bit on the heavyweight side. Plus you need to know a bit of Perl to take full advantage of it.
If you are looking for something simpler to use, you might want to consider HEYU. read this entry »
The script command is a must for any unix sysadmin.
Once invoked, it will faithfully write anything you typed as well as any output generated in your terminal into a file of your choice (defaults to “typescript”).
This is great when you want to document everything you did on a specific server, for example.
spaghetti:~$ script
Script started, file is typescript
spaghetti:~$
When launched, you don’t see anything, but everything displayed goes to a file as well as the terminal.
As usual see the man page for details (like appending instead of creating a new file, launching another command instead of your default shell, and so on)
If you want to replace a text throughout a file in the vi text editor, you can use the following command :
:1,$s/text/replacement/g
Here is the breaking down of this command:
If you want to see how to script a text replacement, check out my previous post about text replacement with sed.
Zsh extends the usual stream redirections with two nice features …
How often have you done the following :
If you occasionaly write shell scripts then it is likely that the answer is “many times”. If so, then you’ll be glad to know that Zsh can automate this for you.
Considere the following snippet :
spaghetti% cat <(date) <(uptime)
Tue Aug 14 16:08:35 CEST 2007
16:08:35 up 79 days, 18:47, 3 users, load average: 0.16, 0.18, 0.16
What Zsh did here is
That is just what you wanted … packed in a handy one-liner.
If you’ve already needed to redirect the output of a command to multiple files, thn you already know the “tee” command. But with Zsh you don’t need tee anymore, because Zsh has it built-in.
See the following snippet :
spaghetti% uptime >test.txt >test.txt2
spaghetti% cat test.txt
16:54:47 up 79 days, 19:33, 3 users, load average: 0.22, 0.15, 0.15
spaghetti% cat test.txt2
16:54:47 up 79 days, 19:33, 3 users, load average: 0.22, 0.15, 0.15
spaghetti%
If you liked this article about Zsh, then you might be interested in my previous article about brace expansion in zsh.
If you’re looking for a good calculator on Linux / Unix, you can use bc. bc is “an arbitrary precision calculator” supporting bignumbers and many operators … well it will mostly do whatever you want (check the fine documentation).
Anyway, about those 2 little tricks I promised :
That was it ! This is what I always need and forget, so I decided to blog it once for all…
If you really don’t know bc yet, give it a try !
Update: you can start bc with a default scale of 20 by using the “-l” option on the command line … (Thanks to Luke).
I previously asked an open question : “which is you favorite Linux picture viewer ?” and got a few answers in the comments, but unfortunately none of them made me happy. I tried quite a few on my own but without much success, till today.
Doing some more googling, I found a great picture viewer : FEH. It’s mostly command line based, it is fast and easy to use.
If you want to have the slideshow of the pictures in a directory then “feh dirName” will do it (even recursively if you add the “-r” option). You can zoom in and out with a middle-click drag left/right, you can do basic editing and delete on the fly.
Check out the feature list of FEH for more…
I’ve just been through hell to get the HEAD revision of GNU Cash to build and run on GNU/Debian … The problem was that GNUCash depends, amongst many other dependencies, on Guile and on the SLIB library for Guile.
If you want to save you some hours, use the following Debian packages (and stick to those versions !)
guile-1.6;1.6.8-6;The GNU extension language and Scheme interpreter
guile-1.6-dev;1.6.8-6;Development files for Guile 1.6
guile-1.6-libs;1.6.8-6;Main Guile libraries
guile-1.6-slib;1.6.8-6;Guile SLIB support
libguile-ltdl-1;1.6.8-6;Guile's patched version of libtool's libltdl
libqthreads-12;1.6.8-6;QuickThreads library for Guile
slib;3a4-4;Portable Scheme library
Good luck !