Archive for the ‘Uncategorized’ Category

Awesome Instructions

Sunday, August 23rd, 2009

Did Charlie write these?

How to go from Intercourse to Climax in under 4 hours

Monday, August 17th, 2009

How to go from Intercourse to Climax in under 4 hours

Heading too far south could end you up in Crab Orchard

And you know you have gone way too far west if you wake up in Sisterville

Off The Hook

Thursday, August 13th, 2009

http://www.ff0000.com/

The answer to the question, is lady gaga a man?

Ride Vids

Saturday, August 8th, 2009

We love watching pro’s doing their thing on the track or circuit… but there certainly is a fair bit of… less quality footage present on youtube.

Now you can get just the good stuff on RideVids.com:

Road Bikes
Trail Riding
Downhill
Moto-X

Or Watch Adam Riemann training for the Erzberg Enduro and Sam Hill Downhilling. If Trials is more your thing, there’s a category for that also.

RideVids.com – accepts a Youtube link submission from anyone that’s found a noteworthy video relating to bikes / riding / racing… if its quality, it gets posted.

So register an account soon before all the cool names are gone :)

PHP and MySQL Time

Tuesday, August 4th, 2009

A lot is said about PHP and MySQL time storage and formatting. I don’t want to say any of it.

What worked for me was using the DATETIME field in MySQL – which will give me the benefit of running server side time-aware queries.

And converting to a nicely formatted time within PHP.

date('F j, Y, g:i a',strtotime($mysqFieldValue))

Obvious isn’t it….

Very Decent Riding

Sunday, March 1st, 2009

Websites During Bushfires and High Visitor Traffic

Thursday, February 26th, 2009

Anyone watching in the past weeks would have noticed the CFA and DSE websites struggle under unusually high load from visitor traffic.

Taken from Tuesday 24th, 2008 Financial Review – “In order to keep this valuable resource online, techies at Google took the CFA’s data and overlaid it onto Google Maps to create a map of the state dotted with coloured balloons showing the location and status of each blaze”

“The number of queries went from two per second to more than 200 per second within less than 24 hours”

If the database server is overloaded because the site is making live queries – that is, queries based on user page-requests, it could easily be resolved by outputting the query data to a static .html file, which is then served to clients by the web server. The query for generating the file could be run as often as every second, giving people ‘to the second’ information which would still only equal 1 query per second on the DB server, an improvement on the the claimed 200 queries per second during the bush fires.

Something like the below code stops the client browser caching any pages, and gets the new version from the server with each request.

header("Cache-Control: no-cache, must-revalidate");
header("Expires: -1");

Now the web server is doing all the hard work, and that is limited to serving static text based content to clients… which is much easier to manage.

Something like this would improve performance assuming the database server and web server are network connected (ie, not both the same box).

Miki Needs Twitter

Thursday, February 5th, 2009

Struggling to see the value of Twitter, it occurred to me how useful can be to anyone wanting or needing regular status updates on a disastrous event like the recent problems at social bookmarker Ma.gnolia. Any members or anyone wanting to get an update on how recovery or status is going, can simply check Ma.gnolia’s Twitter Page to satisfy their urge for up-to-date information.

So perhaps the infamous Miki ticketing system roll out in Melbourne which has hundreds of thousands of punters watching and waiting for the next phase, or a general update on the latest delay… in the absence of promised or expected service, i suppose people appreciate even the most basic information on the issues at hand.

Google’s Dynamic Rounded Images For Div Corners

Tuesday, December 16th, 2008

While logged into gmail:

http://mail.google.com/mail/rc?a=af&c=fff1a8&w=30&h=30

Adjust the color width and height of the circle on the fly… fruity.

Getting Website Hit Stats

Monday, December 8th, 2008

As easy as it is to plug in Googles Analytics JS code into the base of your website, you still wont get a good idea of what spiders are crawling your site, and how often, as well as a few other limitations / omitted abilities.

That is a simple way to use your own custom code to log what’s happening on your site. No fancy graphs here. The fact that it’s completely server-side cleans up the front end code and simplifies the loading of said HTML, with no external references on each page load. Sending it to a database would be one of the first desirable improvements.

NOTE: Be wary of using a single log file that isn’t purged, its fine for a few lines, but once it reaches a few thousand PHP needs to cycle right through it which drastically reduces performance, and pageload.

The following line creates a new file each day, which depending on how many pageloads are expected, should be fine…

$myFile =  "hide_melogs/".date(dMy).".txt";