All posts by nerdOne


Installing node.js on Mac OSX

Node js

I recently installed node.js on a Mac running OSX 10.7.2 and these were the steps I followed at the command line.  Git and Xcode were already installed on the machine so this assumes they are already present.

  1. git clone git://
  2. cd node
  3. ./configure
  4. make
  5. sudo make install

You can test that node is installed by running a simple program such as:

var http = require('http');
http.createServer(function (request, response) {
  response.writeHead(200, {'Content-Type': 'text/plain'});
  response.end('Node.js has arrived.\n');
}).listen(1337, "");
console.log('Up and running at');

You can run this code by saving it as something like testing-node.js and then entering the command:

node testin-node.js

That’s it. Node.js is now up and running on port 1337 !

PS: stop the server with ctrl + c


How to Create a Custom Facebook Landing Page

Custom Facebook Landing Page

Update: Since Facebook launched it’s Timeline in 2012 this information is not really relevant. You can no longer create a page that users see by default.

Custom Facebook landing pages look much more professional than the default wall that everyone else has. Impress your visitors and fans with a custom one. It’s easy. Just follow these simple steps:

  • you need to be logged in to Facebook
  • in the main search box at the top type in ‘static html iframe’ (no quotes)
    • it will be the one with the star icon
  • click on the ‘Add Static HTML to a Page’ button
  • next, select the page you want to add the landing page to from the list
  • click the ‘Add Static HTML: iframe tabs’ button
  • A new item will appear on the far left list (the list with ‘Wall’ at the top)
  • the new item will be called ‘Welcome’ (you can change this later if you want)
    • click on this new item
  • enter html, javascript, css etc. into the text area shown
  • if you want something different displayed to people who have already liked the page, put that in the second text area
  • Facebook requires any images used here to be grabbed from a secure server
    • if you don’t have a secure server you can upload your images to Amazon S3
    • Amazon S3 has free tiers so unless your page is very busy you won’t have to pay
    • however,  you do have to give your credit card info when you sign up to use Amazon S3
  • you can preview your new page by clicking the ‘preview’ button near the top
  • once you are happy with the look of the new landing page you can set it to be the default tab displayed
    • go back to your ‘Wall’ page
    • click on ‘Edit Page’ in the top right
    • on the first page of settings (‘Manage Perminssions’) change the ‘Default Landing Tab’ to your new ‘Welcome’ tab
    • note that you won’t see this tab as the default landing tab while you are logged in as an administrator; you will have to check from a different Facebook account
  • if you want to change the name of your new tab to something other than ‘Welcome’ you can do so by clicking on ‘Apps’ in the list on the left
    • then click on ‘Edit Settings’ under the app in the list (‘Static HTML: iframe tabs’)
    • then enter ‘Custom Tab Name’ and click ‘Okay’
  • Done!

LastPass with Multiple Accounts and Browsers

LastPass with Multiple Accounts and Browsers
LastPass and Multiple Accounts and Browsers

LastPass is a great tool for managing your passwords. The number of passwords we all have these days makes it incredibly difficult to maintain the security of your accounts with strong passwords and actually remember all of those passwords. With LastPass you only need to remember one strong password; it will do the rest.

LastPass comes in the form of browser plugins/extensions for all major browsers. It will remember your passwords across browsers, wherever you are. The LastPass security model is sound so you don’t have to worry about someone getting access to your important information.

One common problem that people encounter with LastPass is when multiple people use the same computer and have different LastPass accounts. By default, LastPass wants to keep you logged in as the same user in all browsers on a computer. Even if you have the plugin/extension/addon installed on completely different browsers (like Firefox and Chrome, not just different browser windows with the same browser) Lastpass will try to keep the same user.

So, if you are logged in as UserA in Chrome and then log in to the extension on Safari as UserB, your LastPass session on Chrome will automatically change to be UserB, the most recent user account you’ve logged in as on any browser on the computer.

This the default LastPass behavior can be very annoying if you share your computer with a spouse or roommate.  Fortunately there is a way around this.

Click on your LastPass icon and up will come the menu. From there, click on Preferences. On the next screen, click on Advanced and then Advanced again in the next window or dialogue. On this second Advanced window/dialogue is a checkbox near the bottom that reads “Share login state between other browsers.” Uncheck this checkbox in each browser on your computer and the problem is solved.


Command Line Tip: Position Cursor with the Mouse

command line tip - place your cursor with the mouse
Place your cursor with the mouse

When entering long commands in the terminal, making changes or fixing mistakes in the middle of the command can slow you down. Moving your cursor over one character at a time to get the to point where the change is needed takes too much time! Fortunately on a Mac you can actually use your mouse to position the cursor wherever you want in the current line.

The trick is to hold down the ‘Option’ key while clicking. Move your mouse pointer where you want the cursor and ‘Option-Click’. When doing this the cursor will actually move to that point in the line. I didn’t believe it until I tried it. It really works! Another command line time saver.

Copy and Paste Without Formatting in Chrome

Google Chrome Logo
Copy – Paste Relief!

For people who work extensively on the web, copying and pasting can be a huge pain; not because the act of copying and pasting itself is a difficult tasks but because when you copy some text from a web page, the formatting of that text will tag along. Normally you just want the content in plain text. People often end up copying the content into a word processor like Textmate or Notepad and then re-copying and re-pasting. What a hassle!

Well, there is a handy built-in shortcut in Google Chrome (my choice for best browser) that automatically removes formatting when you paste. Yay! If you are on a Mac, the shortcut is ‘Command-Option-Shift-v’ and if you are on Windows it is ‘Control-Shift-v’.

The 4 key shortcut on Mac is a bit of a ‘handful’ but it is well worth it.

Easy Fix For Broken WordPress Permalinks

Wordpress Permalink Fix

Have you ever had your WordPress blog’s posts or sub-pages stop working for no apparent reason? Well, that happened to me recently. The home page worked fine but any page other than that resulted in an error page from the browser. How this happened I don’t know (if you have a theory, please let me know) but I did come across a quick and easy fix.

To fix this, you need to reset your permalinks in the WordPress admin interface. To do this, log in to your admin interface and click on ‘Settings’ in the left side bar. This should open up a sub menu. In that sub menu, click on ‘Permalinks’.

Once in the ‘Permalinks Settings’, change your settings to something other than what they are currently set to by clicking on one of the other radio buttons in the upper section of the page. If you’re using a ‘Custom Structure’, make sure you copy what is in there first as it will be wiped out when you change this. Now click on ‘Save Changes’. Then, change this setting to how you had it before and click ‘Save Changes’ again. Voila! Your links should work again!

Easy. Quick. Nerdy.

Twitter iPhone App and Instapaper: A Great Combo

Twitter iPhone App
Twitter iPhone App

If you’re like me an often come across useful links and tweets in your Twitter feed I can’t recommend this combination enough. I’ve used several different Twitter apps on my iPhones but the app that has one out for me is the actual app from Twitter. The app used to be called Tweetie and was a paid app. However, Twitter bought it in April of 2010 and made it free. Thanks Twitter!

I also use Instapaper to keep track of  items on the net that I don’t have time for when I come across them but want to read later. I used Instapaper infrequently prior to using the Twitter iPhone app but since finding the built in integration my Instapaper use has exploded.

It’s so useful to be able to go through my Twitter feed when I’m stuck in a line-up or at a red light and add them to my Instapaper list in a couple taps. Then, when I have a bit more time to kill I can fire up Instapaper the app and read all those juicy items I didn’t have time for previously.

Instapaper iPhone App
Instapaper iPhone App

Check out the Twitter iPhone App at the iTunes Store

Check out the Instapaper iPhone App at the iTunes Store

Check out the Instapaper site

Check out the Twitter site

Top Right Bubble in Mac OS X: The Lozenge

Have you ever noticed that wide grey bubble in the top right of some of your Mac application windows? When I first moved to Mac it took a while before I even noticed it.  Its actually quite handy.

The button, sometimes called the ‘lozenge’ is used in applications that have a ‘Hide Toolbar’ option in their ‘View’ menu.

In Finder the button will hide both the toolbar and the sidebar. If you command-click the button it will modify how the toolbar is displayed, cycling through variations of words and buttons, buttons only, words only and various different sizes of buttons etc.

The Mac Lozenge
The Lozenge

Another handy use of the lozenge is installing an app. When doing so you are often presented with the window that has the app icon. Sometimes there will be an Applications icon that you can simply drag the app icon into in order to move the app to the Applications folder. When this isn’t the case people usually think they need to open another Finder window in order to drag the app to the Applications folder. However, the lozenge can save you this trouble. Simply click on it and a sidebar will appear and you can drag the app to the Applications folder listed there. Nice!

Some other applications that have the ‘lozenge’ include:

Mail, Preview and Adium.

Command Line Tip: Start of Line – End of Line

If you like to work from the command line there are many keyboard shortcuts that can make your life easier. Two of my favourites are control+a and control+e. When you are have some text entered and you want to quickly get to the start or end of the entered text these little shortcuts will save you some key-presses.

ctrl + a: moves the cursor to the start of the line

ctrl + e: moves the cursor to the end of the line

Many of you will already know about these handy shortcuts but if you haven’t I think you’ll really appreciate them.

A Quick Take on the New Apple iPad

New Apple iPad
New Apple iPad

Apple recently unveiled there much anticipated and much hyped tablet device, the iPad. Here’s a quick take on the new offering.


Long Battery Life

  • The iPad is being touted as having an impressive 10 hour battery life with 30 days of standby

It’s Pretty

  • Like most Apple product the iPad is pretty and shiny and more pleasing to the eye than essentially any other hardware manufacturers devices.

It’s a Better E-reader Than the E-readers

  • Your Kindle is kindling compared to the iPad. Georgous full color display with the ability to embed video in publications. Big publishers should be sucking up big time to Apple for the opportunity the iPad gives them. The opportunity to get themselves back off of life support.


No Camera

  • What!? How sweet it would have been to be able to easily do video calls / conferences with this device. No dice. I guess Apple has to save some things to make people have to upgrade to the next iPad when that comes along.

Locked Down

  • Just like the iPod and iPhone, you’ll only be able to put on the iPad what apple allows you too. Apparently this isn’t really a computer but an oversized iPod touch.

You can’t replace battery yourself

  • A common grievance with iPods is the fact that you have to send your device to Apple in order to have a battery replaced. Unfortunately Apple continues this trend with the iPad. This is even more unfortunate considering Apple’s history of battery problems.

Text Entry

  • The on screen keyboard will undoubtedly be more difficult to use that a real keyboard, especially considering the back of the device is rounded. That means typing with the device on a flat surface is all but out of the question as the entire thing will wobble with every ‘key’ press.

No USB Port or SD Slot

  • Again Apple frustrates its users with a lack of standard connections. In order to use a USB based peripheral with the iPad you’ll have to shell out more money to Apple to get an adapter dongle. Would it be so hard to have just included one or both of these? Yes, we get it. The iPad isn’t a ‘computer’.

No Flash

  • This doesn’t bother me that much. I’d love to see Flash go the way of the dodo.

The iPad might make a nice addition to my coffee table or kitchen counter for casual web browsing or emailing and tweeting but I can’t see it being a must have device.  I’ll wait to see if they can get things right in generation two, or until I can get a Google tablet that offers a bit more options and openness. While the iPad may not be ideal for the more technically savvy user there is a huge number of people out there who are less technical and don’t really like computers who will find the iPad will fit their needs very well.