3 columns in twentyeleven WordPress theme

The twentyeleven wordpress theme is the default theme in the latest version of wordpress and probably the first theme you will dig around in to see how it works in WordPress.

Modifying the theme to have 3 columns on the front page is surprisingly easy and after creating a few files you can make your front page look rather different to the original them.

The layout I wanted was to be able to have the latest post as a full width chunk at the top of the page with 6 excerpts in columns see figure 1.

WordPress has the ability to use a file called home.php for its home page if it exsits in the root of your template folder. This is handy because we can then create a copy of the index.php file and edit that rather than modifying the index.php directly.
Continue reading

Data Recovery using ddRescue

While at work today I came up against a booting (to a fashion) Windows XP laptop that had the symptoms of a failing hard disk. Lots of disk errors in the log etc.. My first thought was to backup the data but unfortunately due to disk corruption some of the files wouldn’t copy across. We tried to use CloneZilla with the rescue option enabled to clone the data but even this failed with many read errors. Steve Courtney suggested using DDRescue from a live CD to see if it could copy the data to a new disk.

Continue reading

Guide to creating a compressed image of a windows partition using knoppix, DD and gunzip

I needed a way of backing up my girlfriends Windows Vista laptop as it looked like it had a hardware fault. There are a few live CD’s that will automatically create backup images for you but the techie in me needed to know how to do it manually. (gotta do it the hard way!)

For backing up I used Knoppix 6.4.4 Live CD as it’s a good all round Linux live CD with great driver and software support including an xdesktop. Knoppix can be downloaded from here: http://www.knoppix.org/The software to do the actual backing up is DD which does an exact bit copy of the source disk. To compress the image the process used Gunzip. In this instance the destination disk is a 2TB external disk drive formatted as NTFS. If you’re using FAT32 or another file system, section 5 will need to be adjusted accordingly. Continue reading

Xmarks Bookmark Sync

Recently I have been bookmarking a lot of the pages i”ve used for research. Its incredibly annoying when you require a bookmark you saved on your work machine when working for home. Xmarks is a little utility that allows you to sync bookmarks and other browser data between all browsers you work with.Its a great bit of software and does the job nicely.

The software can be downloaded here: http://www.xmarks.com/

NSLookup – Troubleshoot DNS

NS lookup is a tool to help troubleshoot DNS issues and provide detailed information about DNS records.  Below is a few handy commands:
nslookup
Default Server: hyperion.dsns.co.uk
Address: 192.168.226.4
>

Check Start of Authority (SOA)

> set q=SOA
> lightningone.co.uk
Server: hyperion.dsns.co.uk
Address: 192.168.226.4

Non-authoritative answer:
lightningone.co.uk
primary name server = ns58.eukdns.com
responsible mail addr = luke.scoobyluke.com
serial = 2011071802
refresh = 86400 (1 day)
retry = 7200 (2 hours)
expire = 3600000 (41 days 16 hours)
default TTL = 86400 (1 day)

ns58.eukdns.com internet address = 213.175.196.80

Check the Nameservers (NS)

> set q=NS
> lightningone.co.uk
Server: hyperion.dsns.co.uk
Address: 192.168.226.4

Non-authoritative answer:
lightningone.co.uk nameserver = ns1010322.ukvpshosting.com
lightningone.co.uk nameserver = ns1010323.ukvpshosting.com

ns1010322.ukvpshosting.com internet address = 92.48.70.190
ns1010323.ukvpshosting.com internet address = 92.48.70.191

Check E-Mail MX-Records (MX)

> set q=MX
> lightningone.co.uk
Server: hyperion.dsns.co.uk
Address: 192.168.226.4

Non-authoritative answer:
lightningone.co.uk MX preference = 0, mail exchanger = lightningone.co.u

lightningone.co.uk internet address = 92.48.70.190
>

Check everything (ANY)

> set q=ANY
> lightningone.co.uk
Server: hyperion.dsns.co.uk
Address: 192.168.226.4

Non-authoritative answer:
lightningone.co.uk internet address = 92.48.70.190
lightningone.co.uk nameserver = ns1010322.ukvpshosting.com
lightningone.co.uk nameserver = ns1010323.ukvpshosting.com
lightningone.co.uk
primary name server = ns58.eukdns.com
responsible mail addr = luke.scoobyluke.com
serial = 2011071802
refresh = 86400 (1 day)
retry = 7200 (2 hours)
expire = 3600000 (41 days 16 hours)
default TTL = 86400 (1 day)
lightningone.co.uk MX preference = 0, mail exchanger = lightningone.co.uk

ns1010322.ukvpshosting.com internet address = 92.48.70.190
ns1010323.ukvpshosting.com internet address = 92.48.70.191
lightningone.co.uk internet address = 92.48.70.190

Lookup all hosts within a domain

> ls -d lightningone.co.uk