LiteMySQL — A quick and simple MySQL class for PHP5
December 13th, 2007
Today I released a small and quick side-project called LiteMySQL. It’s basically a PHP5 class which is designed to automate the boring repetitive tasks of opening and managing database connections, looping through the query result resource to get an array and so on.
I created this for a small project I’m working on which basically needs database access on less than a handful of pages. And so I’d have a ready to use MySQL solution other small projects in the future.
And sorry for the lack of information on the project page as of now, but I gotta finish off the original project which motivated me to create LiteMySQL. Once done I’ll update the project page with relevant information
Example Usage:
# general usage
$sql = new litemysql('host', 'username', 'password', 'database', 'table');
$rows = $sql->find_all();
# conditions
# - the following three uses of the find
# function all produce identical results
$result = $sql->find(3);
$result = $sql->find(array('id' => 3));
$result = $sql->find('`id` = 3');
# insert a single row
$sql->insert(
array(
'title' => 'hello world',
'body' => 'my first blog post :D',
'author' => 'John Doe'
)
);
Intuitive WebKit based IM client coming to Windows
December 6th, 2007
Last night I was contacted by one of the developers from a new multi-protocol IM client called Digsby.
If you’re an avid reader of my blog (for reasons that are beyond me… lol), you probably already know why they contacted me. They asked to bundle my Modern Bubbling message style I created for Adium along with a few other of they’re favorites.
Here’s where things start to get interesting. Modern Bubbling wont need to be ported to they’re client, as they’re using the WebKit HTML rendering engine to power their message view.
Incase you’re not an avid geek, WebKit is Apple’s rendering engine developed for Safari a few years back. WebKit was originally based on KDE’s KHTML engine. It’s the rendering engine that powers Safari, Mail, Dashboard, Adium’s message styles, and much more on Mac OS X.
So thanks to the open-source, cross-platform wonder that is WebKit, and some hard work from the development team, Digsby will support all current Adium message styles without any modifications.
Digsby’s goal is to create an intuitive IM client for Windows. They’re seemingly huge fans of Adium, and how well its UI is designed. And not to offend anybody, but personally I have to say no IM client for Windows which I’ve tried so far comes close to being as good and as much of a pleasure to use as Adium is on Mac OS X. And this seems to be the very problem the Digsby team seem determined to fix.
I’m eagerly awaiting to get my hands on the first beta to see if I wont have to be in pain anymore when using an IM client on Windows.
Head over to www.digsby.com and signup for the beta mailing list.
Shamelessly reposted from Fraeon.info
December 5th, 2007
Safari doesn’t always like bz2 compressed DMG files
December 3rd, 2007
I noticed something weird this morning about the recent SimpleDock project I released last night. The DMG is compressed using bz2 rather than the default zlib compression used by default when creating compressed disk images.
Turns out Safari gets confused and guesses wrong a lot of the time with bz2 compressed disk images, and renames the downloaded file to file.dmg.bz2 when the server doesn’t give a DMG specific MIME type. The end result is that you have to remove the .bz2 extension at the end or the file will be unusable. For that you actually have to know of this issue tho, which not all end-users do.
This problem is easily fixed however if you use Apache by simply adding the following to your .htaccess file:
AddType application/x-apple-diskimage .dmg
With this fixed, i still decided to upload a new copy of SimpleDock which is compressed with zlib instead of bz2, simply cause the size difference was 14.23 KB, and Safari doesn’t have any problems with zlib compressed disk images regardless of MIME types. And also cause I wanted to make a minor change to the uninstall info file
The only strange thing though is that the SimpleDock download worked fine last night when i tested it, but this morning when I was testing some other stuff, I noticed it didn’t work properly anymore.
But oh well, it’s all fixed and working now, and I don’t feel like doing any P.I. work today… lol
SimpleDock 1.0 — a Leopard Dock modification
December 3rd, 2007
Do you not like the new default dock style of Leopard? Do you think the 3D style attracts to much attention and distracts your eye-line by not really fitting into any and almost all wallpapers? Do you find the white line around the flat style insanely annoying and ugly?
Myself I answered yes to all of these questions, which was what got me started on SimpleDock a few weeks ago.
From the beginning it was just supposed to replace the flat dock style, but along the way I came across Rev. Mitchz‘ Dark Glass mod for the 3D style which I fell in love with. So thanks to Mitchz’ permission, I included Dark Glass in SimpleDock
Finally tonight I decided to finish and release this project instead of getting a few hours of more than needed sleep. I’d had SimpleDock collecting dust for the past 10-14 days.
I’ve created an Installer and Uninstaller to make the process as smooth as possible for everyone.
Enjoy
Download SimpleDock
What Leopard’s folder icons should have looked like
December 2nd, 2007
I don’t know about your story, but my story of the first time I the new Leopard folder icons goes something like this; “Wait, what? Is this a joke? am I dreaming? WTF?!”.
In the end though when Leopard shipped, these new (from a lot aspects uglier) icons kinda grew on me and I didn’t really mind them that much after about a week. The old Aqua folders unfortunately look horrible as well in Leopard next to the rest of the UI.
Today I stumbled upon Jonas Rask’s latest work, Maji.
Jonas has done an amazing job with Maji (formally known as “QuickLook”) , and i’ve fallen in love with the icon set. It’s the icons Leopard should have shipped with in my opinion.
My only wish for Maji is that Jonas makes more icons for the set, and if I could have a wish, hard drive icons inspired/based on those found in the Agua icon set.
You can download Maji from here. Also check out CandyBar if you haven’t already, makes your life easy when it comes to installing replacement system icons.

