I had a text file with multiple lines of input that I was manipulating using awk and sed but I found the following 'tr' command easiest to remove the line breaks:
cat input.txt | tr -d '\n'
The configuration directive below is one I used to protect multiple URLs with a htpasswd file. So match (~) /url01/ or (|) /url02/ or (|) .... <Location ~... » More
The version of Bind in the normal Red Hat / CentOS repositories is a little out of date. To get more up-to-date versions (9.7.4 at the time of writing) use the Centalt and EPEL repositories. Create the following file: vi... » More
This tool from pendrivelinux.com is a useful utility to help create a bootable USB pen drive with a menu system for booting into multiple operating systems. It works from within Linux/Ubuntu although there is a Windows tool available too. Useful for... » More
I was helping someone with some jQuery to read XML files of Shakespeare plays and this is what I came up with. Very incomplete but he so I can reference it in future.... shaXpeare... » More
Creating customised content based on the origin country of your website visitors requires installing the mod_geoip module for Apache and also the MaxMind GeoIP database as follows (on CentOS): mkdir ~/geoip cd ~/geoip wget... » More
So I wanted to create screenshots of my HTC Hero Android phone from my Ubuntu desktop. So I ... downloaded and extracted the android sdk to e.g. ~/programs cd into the ./tools directory run the ./android program Install any version specific... » More
Armed with a few RPMs I need to install on multiple machines and sick of SCP'ing files around machines I decided to set up a Yum repository. Here's how: On a machine that already has Apache running and serving content: yum install createrepo cd... » More
There is a web page created by someone else containing figures I would like to use to draw some graphs in Munin. The HTML in that page is a bit ugly and looks like: <TR ALIGN = "Center"> <TD ALIGN = "Left" WIDTH = "49%" BGCOLOR =... » More
Todays installment in the Adventures of Squid Sandwich: Forwarding loop detected WARNING: Forwarding loop detected for: in /var/log/squid/cache.log Since I am using a DansGuardian sandwich with Squid for bread I set the unique_hostname... » More