Great guide to using Apache’s mod_rewrite

February 25th, 2010

Stumbled on these great guides for using Apache’s mod_rewrite:

http://www.easymodrewrite.com/guide-syntax

http://www.easymodrewrite.com/guide-advanced

One particular area of interest was the following rules:


RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule  (.*) index.php?page=$1 [QSA,L]

The above rules will pass all URI requests through index.php for handling unless the requested file or directory exists.

Bookmark and Share

Cameron Web Development , , ,


New voucher code site launched

February 17th, 2010

I’ve started using a new voucher code site today called Twible, see: www.twible.co.uk. Here is what the authors had to say about their new site:

Twible is a new discount voucher code and consumer savings website with a difference, we have developed new tools to help you search and filter products across all online stores.

Most discount sites are similar in what they offer you but at Twible our aim is to try and help you find what you want for the cheapest price, whether its with a discount code or not in the quickest and simplest way possible.

Having played with Twible a bit today it does appear that the filter tools mentioned are not yet available. I’ve been informed by the developers that this feature is coming soon.

The thing the struck me when I tried Twible was that it was so clean and uncluttered. Most voucher codes sites I’ve been to overload you with far to much information, I rarely find what I’m looking for. Twible seem to have optimised their site with the user in mind by keeping the design simple, clean and clear of any unrelervant information. It’s a joy to use.

Visit: www.twible.co.uk

Bookmark and Share

Cameron Websites , , , , ,


How to mirror your websites using rsync on Linux.

January 15th, 2010

I’ve been given the task at work to mirror all of our websites on-to our local development server. I knew instantly that I needed to use something like rsync but was unsure how to use it. Also rsync runs over SSH and requires human intervention to enter the login password for the remote server over SSH. As I want the mirror to update daily I would need to setup a cron job but that could not work as the rsync command rqquires someone to type in a password.

After Googling I found this fantastic article at How to Forge: Mirror Your Web Site With rsync. It gives an extensive step-by-step guide on how to setup mirroring using rsync, configuring the servers so that rsync does not require a password when connecting to remote server, and how to setup the cron jobs.

Bookmark and Share

Cameron Networking, Operating Systems , , , , ,


How to copy files & folders from server to server in Linux

January 14th, 2010

Found a fantastic guide at crucialp.com on how to copy files in Linux from one server to another using various techniques including SCP, rsync and tar (over SSH).

Check it out:  How to Copy Files Across a Network/Internet in UNIX/LINUX (Redhat, Debian, FreeBSD, etc) – scp tar rsync

Bookmark and Share

Cameron Networking, Operating Systems , ,


Netgear WNR2000 router not assigning IP address. How to fix DHCP so that it works.

January 13th, 2010

If you have a Netgear WNR2000 router like I do you might find that some computers and devices won’t connect to the internet. You maybe receive messages like the following:

Windows: Limited or no Connectivity

or

OS X: Alert: No internet connection

I had this problem for weeks, I tried updating the firmware to the latest version but this had no effect. The only way I could fix the problem was by restarting the router. The router would then assign an IP addresses but then a few hours later the computers would drop off the wireless and then when they try to reconnect the router would not assign them an IP.

After reading countless posts on the internet I found the solution to my problem in a post on the Netgear forums.

So what’s the solution?

Well it turns out that one of the settings for the DHCP service on the router defaults to the wrong value. Under the LAN Setup section of the routers web administration interface The RIP Version setting was set to Disabled for me and according to the documentation the default should be RIP-2, see below snippet from the routers own documentation:

RIP Version. This controls the format and the broadcasting method of the RIP packets that the router sends. (It recognizes both formats when receiving.) By default, this is set to RIP-2.

RIP-1 is universally supported. RIP-2 carries more information

Changing the value of the RIP Version from Disabled to RIP_2B under the LAN Setup section fixed the issue for me. Hope this helps.

Bookmark and Share

Cameron Networking, Operating Systems , ,


First person to translate this wins blog kudos

August 6th, 2009

If you can read my latest blog post please post a comment with the translation for everyone else to see.

qrcode

Bookmark and Share

Cameron Uncategorized ,


The hard disk you’ve been waiting for…

August 6th, 2009

Found this going through my photo library today. Quite amazing how technology has advanced.

Click to view larger version

Click to view larger version

A bargain at $3398!

Bookmark and Share

Cameron Gadgets, Uncategorized ,


You know when software is crap when…

July 29th, 2009

Today I was amazed. I was using Microsoft Office 2007 on my PC at work to document one of our products. I tried to perform a routine edit operation on some text when Office crashed. Kindly it re-launched and recovered my work. So I attempted to perform the same edit operation again. Guess what?… It crashed again. But this time not only did it restore my work but it also displayed this dialog:

Office Diagnostic

Is it just me that thinks any program that needs it’s own version of Norton Diagnostics built-in and powerful document recovery is probably just a badly written piece of software? Why should end-users have to put up with this nonsense.  No program should require a built-in diagnostic suite. I wonder what my Mum would make of this screen if it popped up when she was working on her essay?

Bookmark and Share

Cameron Uncategorized , ,


CurvyCorners 2.0.4 Released!

July 24th, 2009

I have just released version 2.0.4 of CurvyCorners. The JavaScript library for adding rounded edges to your HTML boxes.

This new version brings a whole host of bug fixes and compatibility improvements with 3rd party libraries.

CurvyCorners Website

CurvyCorners Website

To use just include the javascript in the head section of your webpage and then add the following in your CSS file.

-moz-border-radius:3ex;
-webkit-border-radius:3ex;

Download: http://www.curvycorners.net
Usage: http://www.curvycorners.net/instructions/

Bookmark and Share

Cameron Web Development , , , ,


Mac’s are better than PC’s

July 20th, 2009

Everyday I use my iMac and I am more and more convinced that Mac’s are indeed better than Windows based PC’s. Having spent most of my life being a PC nerd I feel I can say this without bias.

As a Web Developer I have to make sure all my websites work on all web browsers. I have to make sure that the site I have designed looks great in Safari, Firefox, Chrome, Opera and IE6, IE7 and IE8! Obviously IE is not available on the Mac so last year I decided to purchase Windows XP Professional and VMware Fusion. Taken from the VMware site about the product:

Seamlessly run your favorite Windows applications and devices, on any Intel-based Mac. Built from the ground up for the Mac, VMware Fusion is the easiest way to switch to Mac—letting you bring all of your Windows applications with you, making the most of your Windows software investment, while providing the perfect safety blanket for the switch.

What is great about VMware Fusion is that it is not entirely an emulator. The CPU is not emulated but instead uses virtualization. This means that Windows running under VMware is getting full power from the CPU. What is even better is as my iMac is dual core, VMware Fusion gives one core to OS X and the other to Windows. This results in almost now slowdown on the host or client operating systems.

VMware Fusion is built on the industry’s most mature, and powerful virtualization engine, under development for more than a decade. This powerful technology delivers the speed and stability you expect, with low impact on your Mac, letting you enjoy the full power of your hardware.

Using VMware Fusion allowed me to installed two copies of Windows XP one for IE6 and one for IE7/8. I then ran both versions of Windows XP at the same time each occupying one of OS X 10.5’s spaces (virtual desktops). That’s three OS’s at the same time! I was amazed at how smooth they all ran and how little impact running two XP’s had on OS X. I could switch between OS X, Windows XP (running IE8) and Windows XP (running IE6) seamlessly. I was even editing a large file in Adobe Fireworks in OS X and playing music in iTunes.

I challenge any off-the-shelf PC to do better. This is just one more thing that makes me realise why I could never go back to owning a PC.

My iMac’s specs:

  • OS X 10.5.7
  • 2.8 GHz Intel Core 2 Duo
  • 4 GB 800 MHz DDR2 SDRAM
  • 320GB HDD

Bookmark and Share

Cameron Operating Systems, Uncategorized, Web Development , , , ,