Hi! Thanks for visiting my blog. If you've received any value from my content would you mind supporting my new startup by downloading our browser add-on? It's called PriceBlink and makes online shopping a breeze. You can watch it in action here and download it for Chrome, Firefox, IE, or Safari by going to PriceBlink.com. Thank you and I hope you enjoy!

Error with top command on OS X Lion

Aug 30

This is one of those annoying little nits that I wanted to share for my personal use and others. Today I was reviewing a few processes on one of my VMs hosted at Slicehost. I ran the top command to check out the system load and received the following error message:

‘xterm-256color’: unknown terminal type.

I knew something was up because top has always worked for me previously. After searching around a bit I stumbled across a forum post that mentioned this was a problem after upgrading to Mac OS X Lion (which I recently did). The answer was quite simple and consists of installing the ncurses-term package. Since my VM runs Ubuntu I used apt-get to install it:

sudo apt-get install ncurses-term

Everything is now back in working order. Hope this helps.

Read More

Accessing Google Chrome Extension Local Storage Database

Dec 13

I’ve been helping a friend with a Google Chrome extension, which makes use of the Chrome localStorage API. The extension checks for a variable and if it doesn’t exist it writes it to the localStorage database. If you’re note aware, the localStorage database is actually an SQLite database.

For testing he needed a way to change this variable outside the extension to exercise different test cases. The goal was to change the variable and run the Chrome extension to see if it behaved as expected. This was accomplished with the following steps:

1. Download Mike Titlebaum’s nifty SQLite database management tool http://saxmike.com/MySoftware/MySoftware.asp?Menu=MYSOFTWARE

2. Open the localStorage database using this tool. The database is actually a file that exists in the user data directory. For Mac users this is located at ~/Library/Application Support/Google/Chrome/Default/Local Storage. The file will be named something like chrome-extension_[Chrome Extension ID]_0.localStorage. For Windows and Linux you can reference this link.

3. To access this file in Mike’s tool you need to “Connect” and navigate to the file in the file browser. Once the file is opened you need to select the “ItemTable” table. You should see a list of key/value pairs underneath the table.

4. Simply click the key/value you want to change and enter the new value. The new value will automatically update after you hit the enter key.

5. Restart Chrome and test the extension with the changed value.

The alternative was to create a “debug” mode for the extension that would allow the variable to be changed, but for the sake of time this was the easiest path to accomplish the task.

Read More

Dealing with Git: Your branch is behind ‘origin/master’ by xx commits

Jul 27

If you’re new to Git you may be working on a branch and realize that you’ve fallen out of synch with the master. In the case of Subversion you can normally do “svn up” and be good to go. In the case git you’ll normally do a “git fetch” and then a “git status” shows the following:

Your branch is behind ‘origin/master’ by 12 commits, and can be fast-forwarded.

To sync your branch with the master you can issue the following command:

git merge master

and you should now have all the latest changes from master.

Read More

My Collection of Firefox Shopping Add-ons

Jun 15

I wanted to share what I’ve found to be some of my favorite shopping add-ons for Firefox. I put together this collection of shopping add-ons that can either save you money or help you search quicker. My favorite is PriceBlink, which finds cheaper prices for the product you’re currently viewing on a retailer’s site. It also includes coupons and shipping costs.

Be sure to vote for my shopping collection and share it with family and friends!

https://addons.mozilla.org/en-US/firefox/collection/ultimate-shopping-add-ons

Read More

Firefox Extension Development and XPath Replace Function

May 22

If you’re doing Firefox extension development you may be surprised by the lack of the XPath replace function. I definitely was. After looking through the list of supported Firefox XPath functions I found that the translate function did the trick. Here’s a list of supported Firefox Xpath functions for future reference:

https://developer.mozilla.org/en/XPath/Functions

Read More

SVN List Comment and Files Changed for a Certain Revision

Aug 18

I’m spending a lot of time with the SVN command line right now because we’re trying to get a product release out the door. One thing that I’ve found handy is the ability to get the comments and list of files changed for a certain revision number. This is fairly commonplace for SVN GUI tools, but it took me a bit to find out how to do this via command line. Here’s how you do it:

svn log -v -r 7447 https://yoursvnurl.com

You can remove the URL if you’re running this command from your local copy.

Read More