Getting Whirr running on EC2 with Cloudera’s script
I haven’t fully used Hadoop yet, but it looks like a pretty amazing tool for crunching large datasets. Combine Hadoop and Amazon EC2, and it should be possible to crunch large datasets with ephemeral EC2 instances fast. But I had problems getting Hadoop up and running on EC2…
Creating an Amazon EC2 instance using the PHP SDK
Recently I had to write a script in PHP to start up a EC2 instance and then return its hostname. I used the AWS PHP SDK for this. Read more…
CakePHP user/password/authentication manager: the missing guide
CakePHP has excellent documentation on its site on how to do authentication – its actually quite complete, you can just copy-paste and drop in the code into your build and get a working authentication system. The problem is: it doesn’t quite tell you how to handle adding/editing users and particularly their passwords from a UI perspective. There are plugins out there, like CakeDC’s Users plugin, which I haven’t tried, but if you want to stay lightweight and write your own code, here’s a guide.
Dokuwiki users: generating from a list
Recently, I had to create a whole bunch of Dokuwiki users from a list. Here is a script I used for the same.
Joomla plugin upgrade/migration from 1.0 to 1.5
Recently I had to migrate some custom Joomla plugins on an old 1.0.x Joomla website to a 1.5 based Joomla website. I am noting down how I did this since there doesn’t seem to be a similar document out there.
Lazy loading of images (jquery) without scrolling
Lazy loading of images is an awesome idea. But while the current jQuery lazy loading plugin requires one to scroll, this one doesn’t! And in only 4 lines of jQuery code!
PHP script to download sequence of files from website
I often find myself having to read documents split into multiple files, and it becomes a pain to bookmark and go back to them later. I prefer downloading them (if I can) to my local hard drive and place them into a folder. Sometimes the documents are numbered sequentially, which is really helpful since I can use a PHP script to just automate the download.
DokuWiki: Redirect users on logout to front/start page
I have a DokuWiki site for some documentation, and I needed to have it so that users who are logging off and then logging back in are always redirected to the home page. (DokuWiki, by default, redirects them to the page that they were on when the logged out.)
Network Experiment with Three VMWare Nodes on One Machine
Recently I had to set up a network experiment using three nodes, and I had only one machine, and I was able to successfully set this up using three VMs on VMWare Workstation. This is how I did it.
Simple PHP Persistent Storage
For a project I am working on, I had to put together a demo using PHP. One of the aspects of this demo is that it needed a simple persistent storage: it has to keep a count of the number of times a particular URL is passed as an argument, and do something relevant.
Instead of using a MySQL database, I simply used an associative array and serialize() and unserialize().
