Feb/102
Disable Trash/Wastebaket in Ubuntu Karmic
By default Ubuntu Karmic or more detailed the file manager Nautilus moves files which are deleted to a trash or wastebin like it is called in Ubuntu. Using external HDDs which are plugged in to other systems with different operating systems is kind of annoying cause the “deleted” files are moved to a folder named .Trash-. This was the reason for me to check out how to disable the wastebaket in Ubuntu Karmic for at least external HDDs.
Dec/090
Git merging with removal of one commit
Git grew up to my favorite version control system, I use Git on a daily base now. I like git because it is powerful but also simple for the daily usage. Git is a complex system so there are commands and steps which I do not perform every day. So I write about some more complex steps for later reference.
Today I needed to merge two git branches but remove the changes from only one commit where some files were deleted which should be left untouched in the target branch. I realized that using a temporary local merge branch where I removed the unwanted commit to later merge it with the target branch.
Nov/090
tar: Extract specific files from a large tarball
Unpacking single files from big tar archives which have been compressed with gzip (Often named .tar.gz or tgz) is annoying. For example you got a backup of a big filesystem packed in a tarball and just need to restore a single file which size is just a couple of kilobytes. Extracting the whole archive often takes a lot of time. This is time you can really save. Digging a bit into the man pages you will see it is possible to get single files from large tarballs easily.
You will see it is possible to extract single files based on the path, complete directories and even on wildcard based selections. I give you a brief overview about the ways I extract single files from large tar archives using GNU tar on linux / based systems.
Jun/091
Adding email hook script to sourceforge.net git
The NagVis project moved the version control system from subversion to git some days ago. In subversion we used several hooks scripts to inform developers and other platforms about our changes. Since we use a hosted git repository on sourceforge.net in this case I will describe the procedure adding git hooks for the NagVis project. For another project simply replace nagvis with your projects unix name.
You are interested? Take a look at the whole story …
Jan/091
Bash: Timestamp in bash history
The bash history is a useful thing to remember commands which were entered on a system. But it’s not only useful to help your mind – you can also keep track of the entered commands. This is especially interesting on multi user systems. You are able to check the executed commands after the user logs out. That is extra interesting when you spotted some problems like missing files on a system – you would be able to check if someone removed that file.
But by default you can only track the commands entered and you won’t know when they were entered. This could be very important. Thankfully there is a way to add timestamps to the bash history since Bash version 3.0.
See how to configure your bash to save the timestamp for each command execution…
Jan/093
Problem: PHP Gettext translation other than system language in Ubuntu
This is a note to myself: I was fooled by this problem two or three times and had to search all the times for the solution.
I tried to get NagVis work on Ubuntu with a different language than the system language. Gettext did not translate the strings. They were shown all the time in it’s key strings. There was no error message at all. After searching the problem in the PHP scripts I remembered that I needed some package the last time. So I searched for the language packages in Ubuntu. I tried to use the German translation of that application so I need the package for German language: language-pack-de. Simply installing it solves the problem:
sudo apt-get install language-pack-de
Jan/090
Gregarius as Feedhandler in Firefox
I use the web-based feed reader Gregarius since some time to get my daily dosage of news out of nearly 150 feeds. I used a very old version (0.5.4) since today. Normaly I keep my software up-to-date all the time but in this case I remembered that i made some changes to the code and I never was up to check what I changed exactly, update Gregarius and re-add my changes to the new version when needed.
This was completely causeless. I just updated to current version 0.6.1. I replaced all files and edited the dbinit.php manually. On first launch of Gregarius page I accepted to patch the database with some new default configuration options. That’s it…
By browsing through the admin panel I found a “new” link named “Register as Feed Handler” on the Feeds page. Okay, that feature is not new – it is included since version 0.5.5. But this feature is really useful for browsing with Firefox. When you open a feed in Firefox you have a dropdown menu for adding this feed to your favorite reader. Now I can add new feeds by simply selecting it in the form. No copy ‘n paste of the feed URLs anymore.







