sam keen's corner of the web

Monthly Archives: February, 2007

PCC giving an AJAX class and one on Eclipse this term

The faculty asked me to pass this on…
Building Websites with AJAX
Bring richness and responsiveness to your website using themethods that make Google maps so much fun. Learn the techniques and tools of AJAX to bring speed and interactivity to your web presence. With Asynchronous JavaScript and XML youwill find a new way to impress your [...]

Find and Replace in Mysql

Simple but very useful MySQL trick…
UPDATE `table` SET `field` = REPLACE (
`field` ,
‘{string to find}’,
‘{replacement string}’
)

Getting Around Clients that only allow connection from a single IP

As a freelance Web Developer, I often find myself this circumstance.Client X states…
“We can allow you access to our network but only through your single dedicated IP“

I won’t go into how ‘un’-realword this is in this day and age (what freelance coder always works behind a single IP?). I tend to work from coffee shops [...]

Running PHP5 fast cgi with lighttpd on OS X

Lighttpd is a lightweight (lighter than Apache) http server. It has been gaining more an more press lately (The Ruby crowd uses it often for Rails).You can run PHP on lighttpd as a CGI (Fast CGI prefferably). You can even keep your existing Apache/PHP install and run Lighttpd/PHP side by side (on another port)
Step 1: [...]

Insta’ favicon

Dynamic Drive has a very nice favicon tool. I’ve been a fan of the Drive for many years now. Great place to find DHTML widgets

Cache_lite Wrapper Class

Cache_lite is a very usefull PEAR library for implementing lightweight caching mechanisims. Two things it is capable of doing is;
* caching the return from any function * caching any datastructure you pass to it.
One issue with Cache_lites implementation of these two capabilities is that they come from different classes. If you need [...]

Password Policies

Have you ever seen a more pathetic password policy (I’m sure you have but this one is pretty bad). Black-hat hackers must love this if they are able to use brute force type attacks. What poor excuse for a backend can only support passwords in this format?? I never understand why sites don’t allow you [...]