Linux

Restart dead daemon automatically

This is a simple bash script to restart a dead daemon, in this example I’ll use apache #!/bin/bash # Automatically restart httpd if it dies netstat -ln | grep “:80 ” | wc -l | awk ‘{if ($1 == 0) system(“/etc/init.d/httpd restart”) }’

Read More
Windows

Disable ZIP file handling in Windows XP

I do not want to open ZIP files in Windows Explorer since it takes a long time to open big ZIP files. To disable the built in support for ZIP files in Windows XP execute the following command in a command window (cmd.exe) regsvr32 /u %windir%\system32\zipfldr.dll To enable it again regsvr32 %windir%\system32\zipfldr.dll

Read More
Windows

Howto remove unused device drivers from Windows XP

I had a problem with a network card this weekend. It wasn’t possible to get it to work because of a conflict with another hardware or its drivers. After doing some google’ing I stumbled over this link explaining how to remove unused device drivers from Windows XP Just follow these steps to view and remove […]

Read More
Linux

Rename file extension recursively

This is a simple bash script to rename all JPG file extensions to JPEG, it works recursively and takes subfolders also. #!/bin/bash function rename_extension { #change all .jpg to .jpeg for file in $1/*.jpg; do mv $file $1/`basename $file .jpg`.jpeg; echo $file; done; # recurse directories for d in $1/*; do if test -d $d; […]

Read More
Linux

My custom putty settings

This is a quick note of my custom putty settings in Windows Category: Session Connection type: SSH Category: Window Lines of scrollback: 20000 Category: Window > Appearance Font: Lucida Console, 9-point Font quality: ClearType Gap between text and window edge: 3 Category: Window > Translation Character set: UTF-8 Handling of line drawing characters: Unicode Category: […]

Read More