Hosting Subversion In the Cloud with Live Mesh

February 22nd, 2009 matt Posted in Utilities 3 Comments »

This afternoon I was going back through some of the code I’d written for various blog posts that I’d kept in a Subversion repository.  During the move things have been in limbo and I haven’t had time to set up the SVN server again. I thought “Hmm, I wonder if I could host my Subversion repository in the cloud”.

Enter Live Mesh. It lets you add multiple devices to your mesh network and automatically synchronize your files between devices.  Pretty cool stuff.

At first I thought it would be a great place to put all of my source code — then I could have the code on every computer.  However, what if you have working code on your desktop, then open up the code on your laptop and introduce a few bugs.  When you go to open up the project on the desktop again, those bugs are there automatically.  The synchronization is great, but there’s no way to keep version information in case you want to revert to a previous snapshot of the files.

Anyone familiar with Subversion will remember that there are two main parts to an installation — the Subversion repository (could be local or remote) and another folder with the checked-out files. A not-uncommon setup for personal development work is to have a local Subversion repository as a directory on the local file system.  I wonder what would happen if I used slapped a local repository installation into a Live Mesh folder? Well, it would get automatically synchronized between machines. All devices in the network would have an SVN client installed (e.g. TortoiseSVN) and pointed to the Mesh-synchronized folder.  I think this just might work :)

For anyone interested, here are the steps that I followed to set this up.

Open up your Live Mesh Folders from My Computer:image

Set up a new folder named “Subversion”. Make sure that all of the devices in your Live Mesh network are set to “When files are added or modified” in the synchronization options.image

Browse over to the location (Subversion folder on my desktop), open it up, and create another folder inside called “Repository”.

Then, right-click on the Repository folder -> TortoiseSVN -> Create repository here. It’s important to note here that the extra “Repository” directory is important since you can’t directly create the repository in the “Subversion” folder one level up.  There is some interaction between TortoiseSVN and Live Mesh that keeps it from working.

Then, go back to the desktop (or any other place) and make a folder called “Checkout”.  Right-click on the Checkout folder and select “SVN Checkout…”

image

Make sure that the “URL of repository” field is pointed towards the “Subversion/Repository” directory and the “Checkout directory” field is pointed towards the “Checkout\Repository” directory and click OK.

There you go — use the checked-out subversion repository as you wish and just point your SVN client on each device to the Mesh-synchronized folder.

Hope someone finds this useful! :)

UPDATE: Looks like I’m not the first to think of doing this :)

AddThis Social Bookmark Button

“Dual” Monitors on a Budget with Synergy

May 29th, 2008 matt Posted in Utilities 2 Comments »

Recently I got a new machine at work, and managed to keep my old LCD. I have to say, having two monitors has really increased my productivity. (Check out Jeff Atwood’s take on multiple monitors.) I absolutely love it. I can have Visual Studio open on one monitor and the MSDN documentation (and email etc) open on the other.

At home, though, that’s a different story. I don’t exactly have the cash right now to get a 2nd monitor for my desktop. I also have a laptop that I sometimes place beside my desktop. For awhile, I tried to use both, awkwardly switching between mice and keyboards. If you’ve done this, you know the feeling of accidentally typing on the wrong keyboard or moving the wrong mouse, sometimes with disastrous consequences. I wondered if there was some way that I could use both computers with the same keyboard and mouse.

My first instinct was to look into KVMs. They weren’t exactly what I needed, since they switch {keyboard, video, mouse} between two machines. I still wanted to use the laptop screen, so that wouldn’t work. I just needed to move the mouse from the desktop to the laptop, and take keyboard control with it.

As it turns out, there is a solution for exactly this problem! It’s called Synergy, and is an open-source project, so the software is free.

Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems, each with its own display, without special hardware. It’s intended for users with multiple computers on their desk since each system uses its own monitor(s).

Fantastic! It’s even cross-platform, so you could potentially use it with the Mac and Linux box on your desk, should they exist.

In my case, I installed Synergy on both my desktop and laptop (both Windows XP) and plugged them into the same LAN. (It will also work over wireless, but is a little laggy.) I wanted to share my desktop’s keyboard and mouse, so I configured Synergy on my desktop with the “Share this computer’s keyboard and mouse” radio button clicked:

Synergy (Desktop view)

Then I needed to configure the Screens and Links, also on the desktop. This essentially lets me give names to each machine (I just called them “desktop” and “laptop” for simplicity) and also specify the “links” between them. It’s really easy. I wanted to configure Synergy so that when my mouse goes to the right of my desktop monitor, it gets teleported over to the left side of my laptop monitor. I also wanted the left side of my laptop monitor to teleport over to the right side of my desktop monitor. The second rule may seem redundant in this case, but if you don’t define it, then if you mouse from the desktop to the laptop, you have no way of getting back to the desktop! You can go crazy with the rules if you have more than one machine, creating a twisted maze of links and relationships between screens. For usability, though, it’s a good idea to keep things “topologically simple” to not fry your brain :) Here’s my Synergy setup:

Synergy Setup

Once I get the desktop configured, I just click the Start button and it hides in the tray waiting for clients (e.g. my laptop) to connect.

Then on my laptop, I start Synergy and configure it to use my desktop’s keyboard and mouse:

Synergy (Laptop View)

Click Start and the icons on both machines will show a yellow lightning bolt to indicate connectivity. Moving the mouse around actually jumps between screens! Sweet! You’ll also be pleasantly surprised when you discover that copy/paste works between machines as well. :)

Now I can have a “Dual” Monitor setup. It’s not quite the same since the screens are connected to completely different machines, but it does help considerably.

Lately I’ve been developing some distributed system software with WCF, and this setup has been very beneficial since I can easily move the mouse between two computers to test both client and server.

Hope someone finds this useful!

AddThis Social Bookmark Button

Adobe Acrobat Pro No Longer Required

May 27th, 2008 matt Posted in Utilities 1 Comment »

Today I needed to print my resume (a Word document) to PDF. I don’t normally create a lot of PDFs, so I haven’t had a need to buy Adobe Acrobat Professional (not the reader).

Out of curiosity, I wondered how much the professional version cost. $449! Wow… What a rip-off, especially when there are quite a few free programs that let you print to PDF, such as PDFCreator and CuteWriter. PDFCreator is fully open-source, and CuteWriter is freeware (though it is supposedly {ad,mal,spy}ware clean).

I actually found an extremely comprehensive list of the best PDF-related Freeware. I was surprised how many great programs are out there for free.

Hopefully someone finds that useful!

AddThis Social Bookmark Button

Password Overflow? Check Out KeePass

May 23rd, 2008 matt Posted in Utilities No Comments »

I don’t know about you, but I have a lot of passwords. All counted, I wouldn’t be a bit surprised if I have over 100 username/password combinations. Email, SSH, online banking….the list could go on. There is no way that I’m going to remember all of those.

How do you deal with so many passwords? You could conceivably try to make them all the same, or variants of each other. Then you run into sites with certain restrictions, like “at least 1 upper case letter and 1 number” and that throws the whole system off.

I suppose you could also write them all down somewhere, but that pretty much defeats the purpose if someone finds that piece of paper locked up in your safe deposit box (errr, I mean the PostIt note under your keyboard, right? Right?) There has to be a better way.

The solution that I’ve used for the last 2+ years has been to use a password management program, such as KeePass. KeePass is open-source and completely free. It keeps an encrypted database of all usernames, passwords, URLs, notes, etc in an easy-to-use and nicely-organized program. All you have to do is remember one (1) Master Password to unlock the entire database. The program is small and can even be used from a USB stick (KeePass Portable).

KeePass Password Safe

The trick is to make that Master Password long enough to be secure, yet easy to remember (and type). Careful, though — if you forget the Master Password, there’s really no way to recover your password database.

KeePass is a wonderful program, and has been extremely reliable. I’ve never had a single problem with it. I just noticed today that they have been nominated for the Sourceforge.net 2008 Community Choice Awards. If you’d like to nominate them for an award, by all means, go for it! I did — and nominated them for “Best Tool or Utility for SysAdmins”, though it was a tough choice between that an “Best Project”.

In typical Amazon rating lingo, “Keepass: A++ Works as described. Would use again.”

AddThis Social Bookmark Button