goran halusa {web developer}

I design. I code. The web... in frederick, md... using php, mysql, javascript, jquery, node.js, ruby, and mongodb

A while ago, for whatever reason, I couldn’t get my wireless usb card to work on my Raspberry Pi. Well, I finally decided to revisit the issue. Here’s what worked:

First, create a plist file at /Library/LaunchDaemons/org.mongo.mongod.plist:

sudo vi /Library/LaunchDaemons/org.mongo.mongod.plist

Next, copy/paste the following XML into the file (keep in mind, your paths to mongod and the database may differ… adjust accordingly if need be):

If you haven’t yet, create a file for the log and a directory for the database:

sudo touch /var/log/mongodb.log

sudo mkdir /var/lib/mongodb

From the command line, run the following:

sudo chown root:wheel /Library/LaunchDaemons/org.mongo.mongod.plist

sudo launchctl load /Library/LaunchDaemons/org.mongo.mongod.plist

sudo launchctl start org.mongo.mongod

If you get any of the paths wrong in the plist file, resulting in the following error:

launchctl start error: Bad file descriptor

… you will need to unload the plist file and load it again, like so:

sudo launchctl unload /Library/LaunchDaemons/org.mongo.mongod.plist

sudo launchctl load /Library/LaunchDaemons/org.mongo.mongod.plist

From the command line, use the following steps to upgrade Node.js to the latest version using TJ Holowaychuk’s (visionmedia) n module.

From the Readme.md out on GitHub, the “n” module is a:

Simple flavour of node binary management, no subshells, no profile setup, no convoluted api, just simple.

First, clear NPM’s cache:

sudo npm cache clean -f

Next, install the “n” module:

sudo npm install -g n

To upgrade Node.js to the latest version, use:

sudo n stable

To upgrade Node.js to a specific version, use:

sudo n 0.10.32

Check the version:

node -v


I am the worst at posting regularly to my blog. ‘Nuff said.

If you are encountering the following issues after installing AMPPS on Mac OS X 10.8.x:

  • Loading http://localhost/ampps/ or http://localhost/ampps-admin/, nothing displays (the pages return blank)
  • Loading http://localhost/, the folder cgi-bin is displaying

Follow these steps:

  • Make sure MAMP is not running
  • If MAMP Pro is installed, run the uninstall script located in the /Applications/MAMP Pro directory (backup databases and web files first!)
  • Stop apache
  • Reset config in php
  • sudo /Applications/AMPPS/php/bin/php -c “/Applications/AMPPS/php/etc/php.ini” “/Applications/AMPPS/ampps/softaculous/enduser/install.php”
  • Start Apache