Posted (Updated ) in Uncategorized

Due to the antics of some douchebag (IP address 109.120.34.16) I’ve had to look into blocking pages based on IP address with .htaccess files. This may come in handy to others out there so I figured I’d write up my findings.

To block everyone except specific IPs here’s what you’ll need (more info):

order deny,allow
deny from all
allow from <ip address>

To apply this restriction only to specific files, wrap the above code in the <File> tag:

<Files wp-login.php>
	order deny,allow
	deny from all
	allow from <ip address>
</Files>

Thanks to user NuclearMeltdown on the #httpd channel on Freenode for his assistance.

Read More »

Posted (Updated ) in Linux, Uncategorized

Firstly the background: I own a HTC Magic (32B) running Cyanogenmod 6.1. My internet connection is 1.5Mbit down, 256k up ADSL. My router is a Billion 7401VGPR3 with strong signal and several PCs connected to it – each with flawless internet.

The issue: Around the time I bought a new Billion 7401VGPR3 router, the phones wifi started performing so badly it became unusable. DNS lookups would take anywhere in the vicinity of 45-60 seconds or often simply time out and once the download did somehow get going, it would also occasionally time out. I figured this was just an issue with the hardware in my phone – being 2+ years old, it’s getting a bit dated by android smartphone standards. I was wrong.

During my recent trip to Japan, I happened to score free wireless in one of the hotels (Ahh free wireless, how I love thee) and the wifi unexpectedly worked perfectly. Puzzled by this, I did a bit of research. As it tuns out, this appears to be a common issue with HTC phones. I came across this thread on the issue.

The fix: A few suggestions were made on how to fix it. One member suggested trying a different router, which I did (A Netgear FWG114P) and suddenly wifi worked fine. This was all the proof I needed that the Billion was the culprit. I switched the encryption scheme on the Billion from WPA2 to WEP 128 as per another users suggestion (yes, yes, I know. Flame me if you must, but I already know) and my Android is now lightning fast again.

Thank you androidforums, I was on the verge of giving up and buying a new phone but now I’m good to go for several more years 🙂

Read More »

Posted (Updated ) in Uncategorized

Over the last few days I’ve been working tirelessly on this site – moving it to a new home and adding a server-side syntax highlighter (wp-syntax) as well as various other behind-the-scenes improvements. The result should be a faster and load and better resulting experience while browsing.

That is all.

/PSA

Read More »

Posted (Updated ) in Uncategorized

I installed firefox-4.0 (currently 4.0b8pre) on Ubuntu Maverick RC earlier today and all was going fine and dandy until I had to open a Google Docs spreadsheet. I’d receive a message stating:

The bad news is that Google Docs has just encountered an error.
The good news is that you've helped us find a bug, which we are now looking into.

We apologize for any inconvenience this has caused you.
In the meantime, if you'd like updates on this and other issues, try visiting the Google Docs Help Forum.

Sorry, and thanks for your help!
- The Google Docs Team

I checked documents and they seemed to be fine. It turns out this is an issue with Google not recognising FF4’s user agent string. The easiest way to solve this issue is to type about:config into the address bar and set

general.useragent.compatMode.firefox

to true.

Read More »

Posted (Updated ) in Uncategorized

Here’s another little gem for you HTML5 fans out there – link prefetching. Adding the following into a HTML meta or link tag will result in the target being loaded in the background after your current page.

<link rel="prefetch" href="/images/big.jpeg">
or
<link rel="next" href="2.html">
or
<meta http-equiv="Link" content="/images/big.jpeg" rel=prefetch">

Both ‘prefetch’ and ‘next’ are accepted.

Here are a few advantages of using this method:

  • It’s HTML compliant
  • It’ll dramatically speed up the resulting page/file if successfully prefetched
  • It doesn’t slow current page load
  • No same-origin restriction – any domain is accepted

There are several limitations to this method that should be noted:

  • Firefox only (for now)
  • Only HTTP protocol is accepted
  • No URLs with querystrings accepted

To learn more about link prefetching check out the Link Prefetching FAQ at Mozilla Developer Center

Read More »

Posted (Updated ) in Uncategorized

Let me preface this post by stating that I have the design talent of the average developer – that is to say: none. So when I decided to start learning about CSS3 @font-face I thought I was going to be in for a night of pain; boy was I right.

The post headings on site are rendered in the Museo font using Cufon. Cufon is an amazing piece of JavaScript that allows you to embed fonts into webpages making them visible in all browsers. It works as advertised, however it has a habit of causing pains for visitors on slower connections. For this site, the cufon script is 17.8KB and Museo font package is an added 190.4KB – a hefty download. At this point, the developer in me would declare the benefits not to be worth the drawbacks and scrap it all together. Luckily for all of you though, I’m constantly surrounded by talented designers, namely That Stevens Guy and begrudgingly blindly follow what they tell me to do in that department. So cufon has stayed. Is there a better solution though? Meet @font-face.

Read More »

Posted (Updated ) in Uncategorized

It’s been several years since I started work as a web developer and finally I have a site of my own! This has been a long time coming and here’s hoping it won’t dent Australia’s reputation as an marvellous people too badly. I’ll be adding various tutorials to help spread my knowledge – check it […]

Read More »