Open Source software was becoming more and more popular in 2009, even though many of these applications were still little known. According to PCWorld,[……]
Author: Andrea
How to soft reset Linux disks
Sometimes disks stop responding and cause system slowness because the kernel is waiting for a response that never comes. The disk appears 100% utilise[……]
Find sdx device/ATAx mappings
When dealing with hardware, you often see log messages like:
ata9: hard resetting link
ata9: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
To map[……]
Convert Squid/timestamps to a human readable format
Somebody had the brilliant idea of using Unix timestamps in Squid log files. It makes parsing easy but reading them is not so human-friendly.
This is[……]
bash – remove first line with tail and last line with head
Say you have a file called test.txt:
line 1
line 2
line 3
Remove the first line:
tail -n +2 test.txt
Remove the last line:
head -n -1 test.txt
R[……]
sed – match and replace BIND/DNS serial number programmatically
I had to make modifications to several BIND zone files. Sed proved itself invaluable once again.
The zone files looked like this:
domain.com. IN SOA[......]
Remove all non-ascii characters with perl
Sometimes when creating one-liners, the source contains non-ASCII characters that make parsing harder. To strip them all out, use Perl:
cat dirty-sou[......]
Converting spreadsheets to text files with ssconvert
ssconvert is a utility shipped with Gnumeric, a command-line spreadsheet converter. It is useful when you have data in a spreadsheet and want to parse[……]
Firefox – prevent websites from refreshing
Fed up with websites and tabs continuously reloading themselves and using resources unnecessarily? Me too!
In Firefox, you can disable this from the a[……]
How to update all docker base images with one command
To pull the latest version of all your Docker images at once:
for docker in $(docker images | awk '{print $1,$2}' | sed 's/ /:/g' | grep -v REPOSITOR[......]