Getting Whirr running on EC2 with Cloudera’s script

January 12, 2012 Leave a comment

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…

Read more…

Categories: AWS Tags: ,

Creating an Amazon EC2 instance using the PHP SDK

January 11, 2012 Leave a comment

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…

Categories: php Tags:

CakePHP user/password/authentication manager: the missing guide

October 1, 2011 3 comments

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.

Read more…

Categories: php Tags:

Dokuwiki users: generating from a list

September 24, 2011 Leave a comment

Recently, I had to create a whole bunch of Dokuwiki users from a list. Here is a script I used for the same.

Read more…

Categories: php Tags:

Joomla plugin upgrade/migration from 1.0 to 1.5

August 6, 2011 Leave a comment

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.

Read more…

Categories: php Tags:

Lazy loading of images (jquery) without scrolling

February 8, 2011 8 comments

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!

Read more…

Categories: jquery Tags: ,

PHP script to download sequence of files from website

December 24, 2010 Leave a comment

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.

Read more…

Categories: php

DokuWiki: Redirect users on logout to front/start page

December 21, 2010 2 comments

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.)

Read more…

Categories: php Tags:

Network Experiment with Three VMWare Nodes on One Machine

September 21, 2010 1 comment

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.

Read more…

Categories: Network Tags: , , ,

Simple PHP Persistent Storage

July 13, 2010 Leave a comment

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().

Read more…

Categories: php
Follow

Get every new post delivered to your Inbox.