Zero Filling a Disk in Linux

Zero Filling a Disk in Linux

The simple way to wipe or zerofill a disk is: dd if=/dev/zero of=/dev/sd? bs=1M However I found an article describing how to zero-fill with a progress indicator using pipebench, installed on Debian/Ubuntu ...

Increasing CentOS LVM under VMWare

Increasing CentOS LVM under VMWare

Background: I had an existing CentOS machine as a virtual machine running on VMWare ESX Server and it was running out of space so for future reference I did the ...

SquidGuard LDAP User Search and Special Characters

SquidGuard LDAP User Search and Special Characters

So I had a problem with the ldapusersearch string as some eejit has created an OU with spaces and an apostrophe in the name. So the characters are represented as: comma ...

Flushing local client DNS cache

Flushing local client DNS cache

From info I found here. This is how to flush the local client DNS cache. Windows: ipconfig /flushdns Linux: sudo /etc/init.d/networking restart Mac: lookupd -flushcache

Browsing all articles in web design

Resetting WordPress User Password

Get to the MySQL prompt and use something like the following: UPDATE wp_users SET user_pass=MD5(‘secret’) WHERE ID=1;

jQuery Zebra Stripes

Traditionally I added these tiger/zebra stripes for alternate row colours within PHP but with jQuery we can accomplish the same with the following. I had a little difficulty getting the [...]

Internet Explorer 8 CSS Issues

I had a brief issue with a quickly thrown together website. Specifically the margin:auto; centering was not working in IE8 and jQuery scripts were not behaving. I found out that [...]

Website Statistics with Visitors

As a useful addition to the webstats armory Visitors offers a quick way of getting a HTML report of site usage from server logs. We mainly use AWstats, Webalizer and [...]

Opera Mini on Ubuntu

I’m using Ubuntu 9.04 and I wanted to be able to run Opera Mini for testing web sites: Download MicroEmulator from here (or direct version 2.0.3) Extract the tar file [...]

Example robots.txt

Not all crawlers obey all of these rules but as a reference point. The crawl delay is the number of seconds between requests and the newer request-rate is set here [...]

Printing Random Array Elements in PHP and Javascript

Non-dynamic tag cloud?  <script language=”JavaScript” type=”text/javascript”>                                var mytags = new Array(                                “histories”,”names”,                                “land”,”lists”,”free”                                );                                var randomseed=Math.floor(Math.random()*8)                                for(i=0;i<mytags.length;i++){                                        var randomnumber=Math.floor(Math.random()*141)                                        randomnumber=randomnumber+40;                                        if(randomnumber%randomseed!=0){                                        document.write(“<a style=’font-size:”+ randomnumber +”%;’>”+ mytags[i] + “</a> “);                                        }                                [...]

Debugging PHP Errors

To debug PHP without having to amend the php.ini for all websites add the following in a .htaccess file in the directory of the application. Easy to switch on and [...]

Buy Wine Online in Ireland

La Petite Princess, based in Dundalk, have just launched an online service for wine in Ireland, offering 12 bottle cases of La Belle Terrasse French wine at savings of €3 [...]

WordPress Theme Tutorial

This tutorial is useful for converting an existing design to a WordPress theme quickly:http://jonathanwold.com/tutorials/wordpress_theme/