TechStars Applications

The deadline for TechStars Boston applications for Spring 2010 is quickly approaching (January 11th). If you’re considering applying I’d definitely encourage you to do so. TechStars is a great program to help start ups get off the ground and get to the next level. It provides a little cash to keep the lights on, an amazing set of peers to work with, and an impressive network that will make all the difference. I was part of the 2007 class (Boulder) with IntenseDebate and I could not recommend it more. The program is an amazing accelerator that will help you get done in 3 months what takes most companies a year or more.

So head on over and apply. It might just change your life (it definitely did for me).

Posted in Entrepreneurship | Tagged | 1 Comment

Add a custom url shortener to Firefox

I recently wrote a post about why I made my own url shortener. I’m now porting some of my common uses over to use this new shortener (keep life simple, right?). The first thing I wanted to address was adding an option to the right-click menu to shorten whatever page I was currently viewing and copy it to the clipboard. The easiest way I found to do this was to modify an existing Firefox addon called Shorten URL. It works particularly well because it already supports a TON of shortening services and adding new ones is a breeze. So how do you do it?

  1. First, download the extension.
  2. Next, find your Firefox profile folder.
  3. In your profile folder, find and open the “extensions/ShortenURL@loucypher/defaults/preferences” folder.
  4. You should then find a file named shortenURL_prefs.js – open it in any text editor.
  5. You should see two large blocks of similar lines repeating – find the last one in the first block (as of writing this it is pref("extensions.shortenURL.name.145", "w3t.org"); and add a new line below it (incrementing the number) and swap out the name w/ whatever you want to reference your url shortener as. (in my case pref("extensions.shortenURL.name.146", "jfox.in");
  6. Continue to the end of the file and you should find a matching url line pref("extensions.shortenURL.145", "http://w3t.org/?module=ShortURL&file=Add&mode=API&url=");. Add a new line below this one incrementing the number again (to match the one in the last step) and adding the url of the page to submit a url to shorten (the url will be appended to the end). For example: pref("extensions.shortenURL.146", "http://jfox.in/make-tiny.php?url="); (note the example here won’t actually work because my shortener is private).
  7. Save the file and restart Firefox. Now go to Tools->Add-ons, find ShortenURL in the list and select “preferences”. You should now be able to find your custom shortener in the list using the name you provided above (in my case jfox.in). Select your preference and enjoy!

A quick trailing note: This all assumes that your shortener has an interface that allows a url to be passed as a GET parameter and returns the shortened url in plain text as a result of that request. This is straight forward to implement, but worth mentioning. You should now be able to shorten simply by right-clicking and selecting the “Shorten this page URL” option (which will also copy the short url to your clipboard and put it in the location bar). Enjoy!

Posted in Code, General | Tagged , , | 5 Comments

How to sync Firefox across multiple computers using Dropbox

I often work across several different computers. I have a desktop, a macbook, and a laptop that all get used for a variety of tasks pretty much everyday. This can be a huge pain to keep things synchronized – especially web browsing (which is the vast majority of what I do). I’ve used several plugins in the past to help synchronize my setup, including Xmarks (formerly FoxMarks), but FINALLY I’ve found a solution that will sync all of my bookmarks, extensions, session history, settings, greasemonkey scripts, etc in one solution. In short, I’m using Dropbox (a great service on its own) to synchronize my Firefox profile across all the computers using a symlinked directory. Detailed instructions to follow.

  1. First thing to do is head over to Dropbox, get an account, and install it on all the computers you’ll be syncing across. This is very straight forward and they have installation options for Windows, Mac, and Linux.
  2. Pick which computer has your “master” profile (the one that will be the starting profile replicated across all your machines) and start there.
  3. Close Firefox if it’s open.
  4. Next, you need to find your Firefox profile folder. Details for this on all major platforms can be found here.
  5. Once you have found your profile folder to sync, I STRONGLY recommend that you backup this folder somewhere.
  6. Find your Dropbox folder (defaults to /Users/[username]/Dropbox on a Mac and C:\Users\[username]\Documents\My DropBox on Windows), create a new directory to store your Firefox profile in (I used firefox-profile).
  7. Copy the contents of your Firefox profile folder (found in step 4) into the newly created Dropbox folder created in the previous step. It should start syncing immediately, I recommend waiting till it’s complete before continuing.
  8. Store the name of the Firefox profile folder somewhere, and delete this folder.
  9. Now we need to create a symbolic link between the Firefox profile folder (which you backed up, right?) and the Dropbox folder we just found in the last step. On Mac/Linux the command for a symlink uses the syntax ln -s target link_name – which you may need to run as root (On Windows, the command uses the syntax MKLINK /D link_name target – this should be run from the command prompt and you may need to run this as admin in order to complete this. You can run this as an admin by going to start, typing cmd, right click the command prompt option and choose “run as administrator”) where link_name is the original Firefox profile folder (found in step 4) and target should be the shared directory in Dropbox used to store the profile (I used firefox-profile in my Dropbox folder – be sure to use the full paths for simplicity).
  10. Repeat steps 8 & 9 for each computer, finding the Dropbox and Firefox profile folders on each system. Also, be sure to close Firefox completely before modifying the profile folder – and back up if you’d like to keep that profile info.

And that’s it! When you reopen Firefox it should open using the shared Dropbox directory and sync all your plugins, bookmarks, session history, etc across all of the machines. There are a few things I should mention as well though. First, you’ll probably want to turn off Dropbox notifications, as these files change often while browsing and will be resynchronized with each update. Notifications for this can get annoying quickly. You also might notice some weirdness if you browse on multiple computers at the same time…both keep trying to save their session history (and everything else) to each other and will continuously overwrite each other. Shouldn’t do any permanent damage, but worth thinking about.

Let me know if you have any other suggestions of if you get this working for yourself in the comments below.

Posted in Great Stuff | Tagged , , , | 10 Comments

My own short URLs

A little while ago I setup my own short URL service on http://jfox.in. I already know there are tons of free services that already do this and there are even a few open source alternatives of projects aimed at this kind of thing…so why then did I decide to write my own? There are actually a couple reasons:

  • Full control of the data – I can get at it wherever, however, and whenever I want to. I can also move it into different formats and systems at will.
  • Full control over the service – I can add whatever features I want in whatever interface I want and not have to worry about the 15 other features I’ll never use that clutter up my UI.
  • Full control over the URLs themselves – I don’t have to worry about the domain shutting down, remapping my short URLs some time in the future, or what type of header redirect they’re using to make sure I get my Google juice.
  • It was fun – Perhaps the biggest reason I wanted to do this was because it’s such a simple project and it was kind of a fun exercise for me.

Anyone that is code savvy and is considering doing this – whatever your reasons – I definitely recommend doing it. It was simple and something I enjoyed, and it gives me the control I want in such a simple application. Not every problem makes sense to roll your own solution for, but this is one that does in my mind since it’s so simple.

I honestly wouldn’t be surprised if we see more web services offering their own custom URLs. It allows a bit more brand recognition and all the control issues I mention above. It also seems that short URL services aren’t going away anytime soon.

Do you have any thoughts on the merits of short URL services? Have you written your own or considered doing so?

Posted in Code, General | Tagged , , | 5 Comments

The Beauty Of Simplicity

It seems that no matter how hard I try, I often accumulate “cruft” in my life as I go. What I mean by “cruft” is junk and distractions that get in the way of what I’m trying to do. I find it very useful to periodically go through different areas of my life and clean up the “cruft”. I’ve been doing this with a lot of my online / digital self recently. Here’s a few things I’ve been doing recently to cut down on the junk:

I’ve…

  • added a bunch of new filters and/or unsubscribed from a bunch of email in an effort to keep the “bacon” (basically spam you ask for) to a minimum and keep it from getting in the way of the more important/urgent email.
  • gone through and attempted to condense down several email accounts into one Gmail account to give myself fewer points to check (and fewer mail clients to worry about).
  • gone through my background apps (and startup apps) to cut down anything I’m not using anymore – or that just doesn’t need to run at startup.
  • “cropped” my iPhone apps and my FireFox plugins.
  • gone through a bunch of work related files on my computer and condensed / archived old stuff to get it out of the way.

Sometimes it’s good to cut down on all the little stuff that gets in your way. You might be surprised how much some of these little things can impact you when combined together. Now if I could just tackle my closet…

Posted in Introspective | Tagged , , | 10 Comments

Burnout Revisited

Several months back I wrote a post about a bad case of burnout I had unexpectedly run into. I had known I was approaching burnout, but didn’t really realize just how burnt out I had gotten until someone else pointed it out to me (via a blogpost). Unfortunately I’ve run into the dreaded dead end again.

Recently I’ve been pushing myself really hard. Working longer hours trying to get through a few releases we needed to get done with work. I’ve simultaneously been trying (and failing) to complete several personal chores/goals/responsibilities. All of it has recently come to a sudden crash as it just finally became overwhelming. I found myself not sleeping, barely eating, and snapping on friends and colleagues.

I’ve since had a little time to calm down – taking a weekend off of the normal stuff to try to recover. It has brought me back to a question I’ve asked myself before, however. How do I retain my passion for what I’m doing while not driving myself to the edge and beyond? I’ve been floating several ideas that I’m planning to try, here’s the short list:

  1. Take a weekend a month and schedule some time off of the normal stuff. Maybe a vacation, maybe just trying something new, but something away from the usual work/personal woes that pile up.
  2. Find more balance in my day and create daily goals of what to get done (as opposed to weekly goals I’ve used in the past).
  3. Force myself to step away from whatever I’m doing if I’m sinking too much time into one task or area of my life.

I’m definitely open to suggestions or feedback, but this is what I’ve loosely come up with to try. How do you prevent burnout? What do you do to make sure you recognize it once you’re approaching it?

Posted in Introspective | Tagged | 9 Comments

Lorem Ipsum Post Generator WordPress Plugin

I’m constantly working with test blogs for IntenseDebate. Often, I need new posts and/or comments to give me some data to play with while testing new features, debugging old ones, or just to show something off. Instead of creating endless posts and comments of “testing 123” and “another random test post”, I decided to throw together a quick WordPress plugin that will generate the posts for me using Lorem Ipsum text. It has a couple options, mainly the number of posts to create, a min and max number of paragraphs per post, and a min and max number of comments per post. I find it really useful for generating some test content quickly. I’ve posted a screenshot below. It’s nothing beautiful, but I thought it might be useful to someone else out there. I’ve posted the plugin here if you want to check it out.
Screenshot of the Lorem Ipsum Post Generate Plugin

Posted in Code, php | Tagged , , , | 1 Comment

Internet Explorer and the innerHTML Property

Recently while helping a friend deal with the joys of cross-browser JavaScript when working with widgets, I was reminded of a painful quirk in how Intenert Explorer handles the innerHTML property of DOM elements in some cases.  In particular, DOM elements that are part of a table, or are a child to a table (no matter how many levels deep), can’t have the innerHTML property set at run time.  Doing so produces a completely unhelpful error message and crashes the rendering engine.  This is not only true for tables, but unfortunately happens with several other HTML elements in regard to Internet Explorer.

So, how does one get around this unfortunate problem?  Well, the best method I’ve found is to set the innerHTML property when the element is not yet attached to the DOM or is attached in a “safe” place (usually at the BODY tag).  To make this process simpler, I generalized this into a function that creates a new DOM node of the same type, preserves any attributes I care about, sets the innerHTML property, and replaces the original node in the DOM with this new node having the desired innerHTML.  Here’s the function for reference:

function replace_html(el, html) {
	if( el ) {
                var oldEl = (typeof el === "string" ? document.getElementById(el) : el);
                var newEl = document.createElement(oldEl.nodeName);

                // Preserve any properties we care about (id and class in this example)
                newEl.id = oldEl.id;
                newEl.className = oldEl.className;

                //set the new HTML and insert back into the DOM
                newEl.innerHTML = html;
                if(oldEl.parentNode)
        	        oldEl.parentNode.replaceChild(newEl, oldEl);
                else
		        oldEl.innerHTML = html;

                //return a reference to the new element in case we need it
                return newEl;
	}
};

Hopefully this function will help someone out there work around this problem a little faster than I originally did.

Posted in Code, Javascript | Tagged , , , | 34 Comments

Gravatar in Gmail

UPDATE: I’ve posted a new version of this script here. The version on this page no longer works.

Earlier today I hacked together another GreaseMonkey script. This one adds a Gravatar of the person the email was from to Gmail when reading an individual message. It’s inspired by the Thunderbird integration I read about here a while back. Here’s a screenshot of it for a better understanding of what it does:
Gravatar in Gmail

It’s really just a prototype honestly, but it was far enough along to make me happy for now. A couple of limitations I’d like to correct some day (if I ever get around to it) would be to modify it to work with multiple open messages and to only display the image if the email address actually has a gravatar (currently it just displays the default gravatar image in this case). It would also be nice to clean up how the image is added to the email – currently it’s a long dom navigation. I’ve posted the script here if anyone is interested in giving it a try (or updating it). Also, if you didn’t already know about it (because I didn’t) the Gmail team has built a nice little API for people developing GreaseMonkey scripts.

As always, feedback welcome.

Posted in Code, Javascript | Tagged , , | 20 Comments