Installing Node.js properly on Ubuntu

I do not know why this is not documented well and why Ubuntu has decided not to update their repositories, but I have been encountering issues when installing Node.js packages. npm ERR! Error: failed to fetch from registry: bower Fortunately you can fix this by removing your current Node.js and...


Using Redis for Caching in Node.js

Your web service is slow and you want to store things into memory for cache. Luckily, it's pretty easy to do this in your Node.js Express application. Steps First you want to install your Redis module from npm. Also make sure to edit your package.json with the appropriate module and...


Moving Away from MAMP and into Homebrew

So one of the most annoying things I ran into the PECL support from MAMP. This means no easy external extention setups for you. It also means those php.h headers that you need to compile against PHP with does not exist either. Don't get me wrong, MAMP is a really...


Preparing Your Titanium App for iPhone 5

Introduction So as you know, Apple has released a new iOS device that increases the screen height. If you app isn't prepared for it, it will letterbox your existing application. It'll make your app look odd and you're not using the full screen space! What a waste. Now because Titanium...


Installing AirVideo Server on Debian Squeeze

Introduction If you didn't already know, AirVideo is a nice utility which lets you stream your media files to your iOS devices. It compresses and re-encodes them on the fly so that it is playable by these devices. If you don't already have it, AirVideo is $2.99 on the App...


Inheriting a Base Controller In CodeIgniter

Introduction So sometimes you want to have a base controller class where you can store common methods through out all your controllers. Here's how you do it. Steps Writing the Inheritable Controller All you need to do is write the file application/core/MY_Controller.php <?php class MY_Controller extends CI_Controller { function __construct()...


CodeIgniter and CDNs

Introduction So in the past, I realized that some of projects gained traction and new projects had a requirement to off-load static content using a Content Delivery Network. Simple Steps So you should be using base_url already in your application to link to your assets or content. If you are...


MongoDB PHP Extension for MAMP

Introduction So you want to use MongoDB for the PHP application, well we need to install a extension for PHP so we can easily interface with it. Unforunately, using PECL will not build it correctly, so we need to install a pre-built extension from 10gen themselves. Simple steps cd /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts*...


Time Machine Backups to Debian/Ubuntu

Introduction You have a server that has a large disk array. You want to use that disk array for your Mac backups. Fortunately, Mac OSX has this nice utility named Time Machine which makes backing up and restoring your computer really easy. However, unfortunately, you need a physical disk or...


Using CodeIgniter Migrations

About Migrations give you the ability keep your database across all environments the same without comprimising the data inside the database. Think it as a version control for your database schema. You should be doing this at all times especially when there are multiple developers so all developers don't need...