A Free and Secure Git Solution

You need a few things

First of all, the Git repo doesn't need to be on a second machine but I like to dedicate a machine in the house (that is always on) so that anyone can use it at anytime. This approach also centralizes the repo and makes things slightly more convenient to manage.

Next, sign up for a free account at Dropbox. (You should be able to substitute any cloud-based solution (Sugar SyncJungle Disk, …) or even a backup system like Crash Plan.)

Next step, follow the instructions on the TrueCrypt site to create a secure volume on the machine housing your Git repository. Be sure and create the file underlying this secure volume inside of a directory that gets replicated to the cloud solution you recently signed up for.  This can be tricky to understand at first so beware, you are NOT backing up the secure volume at the mount point, instead, you want to backup the underlying file you created for the secure volume. You may want to size the secure volume a bit smaller than your cloud based quota - just to be sure you don't go over. As you will see below, I keep mine at about 2GB.

Now you'll need to install Git on that same machine, mount the TrueCrypt volume you just created and then prepare a Git repository inside of that secure volume. This isn't a Git tutorial so I won't go into much detail but I usually end up creating a directory with a .git extension, changing into that directory and initializing the repository with something like $ git init --bare

You will then need to enable SSH access to the Git repository. The machine housing the repository needs an SSH server to accept requests while the machines using the repository need an SSH client to connect to the server. This step requires different things for different platforms. I have had the easiest time doing this on my Mac and Linux boxes but it can be done just as well on Windows machines using something like Cygwin or Putty - it is just a bit more cumbersome.

That's it. My remote Git paths look something like imac:/var/github/ios/project.git. IPs and other types of paths should work just fine and don't be afraid to experiment and write in with what worked for you!

Note that in my case, Dropbox doesn't sync files that are in use. Consequently, it doesn't sync the the secure volume while it is mounted (since it is simply a big binary file). This means that I explicitly mount and unmount the volumes once a day or so. Also, since the secure volume looks like one huge binary file to Dropbox, it will try to sync the whole thing - consequently, I tend to keep my secure volumes small (2GB) and just create more as necessary. If you don't need the extra security that TrueCrypt affords, feel free to keep your repository directly in your cloud's backup directory space and it will get backed up according to your cloud's schedule (which could be as often as instantly).

Filed under  //   dropbox   git    truecrypt  

Comments [0]

POCO - Plain Old Cocoa Object

Let me be the first to coin the phrase 'POCO' - for a Plain Old Cocoa Object!

Filed under  //   cocoa  

Comments [0]

Cocoa in a Few Words

It isn't about you. It isn't about your code. And it isn't about your code doing this or that. It's first about the user and responding to the user. It's second about your code responding to the framework. You don't usually tell the framework what to do. It asks you for things when it needs something. You sit and wait for it to talk to you. You're not in charge. You don't control the runloop; it controls you. You register to be told when things happen, and you indicate that you're the object who knows something about something (data for a table for instance). And then you let go, and let Cocoa do the rest. It's a very different world. I like it very much.

Rob Napier

Filed under  //   cocoa  

Comments [0]

Beginning Photoshop Tutorials

I've used Fireworks, Photoshop and Illustrator in the past but recently decided that I wanted to create graphics as awesome as those found on dribbble - so I set out to formally work through a few Photoshop books.

I started this evening with Chapter 01 of the "Classroom in a Book" series for Photoshop CS5 (on my kindle no less :)

Filed under  //   design   graphic-design   photoshop  

Comments [0]

Cocoa for Windows

Well, not exactly.

I wasn't real excited about the Qt toolset - I got something working but the Mac interface doesn't quite work yet. Something as simple as selecting and copying text started to misbehave in their designer tool. The widgets themselves seem to work quite nicely but after a bit of thought, I decided to try my own hand at writing a small GUI framework for my Window's ports.

This morning I finished some C++ to open a MainWindow along with a SplitView child. It isn't Objective-C so it isn't perfect but indeed, I am including things like delegates and where approrpriate, opting to conform to Objective-C interfaces and general design decisions. It's turning out to be quite fun. Once I finish a rudimentary framework, I should be closer to completing the Windows port of my new idea!

Filed under  //   cocoa   qt   windows-api  

Comments [0]

Qt for the PC from the Mac

I have an idea for an app that I'd need to port to the iOS, Mac and PC platforms and while I don't mind different codebases - a huge benefit for me will be the ability to write the PC version from my Mac.

Qt's current distribution includes an IDE that appears to work on the Mac, PC and Linux platforms and the fact that Qt natively supports Nokia and Windows CE devices seems like a lot of bang for the buck.

More to follow I'm sure!

Filed under  //   qt  

Comments [0]

Deciding Which Links to Embed in a Blog Post

Like every other blogger out there - I have to decide how to link to external websites. It's tricky because so often, websites get revamped causing all your links into their site to break. In a previous post, I wanted to reference the Windows API and I had to choose between a Wikipedia URL (http://en.wikipedia.org/wiki/Windows_API) and Microsoft (http://msdn.microsoft.com/en-us/library/ff657751(v=VS.85).aspx).

At first thought, the wiki version seems like the better bet. Wikipedia seems to understand internet addresses and even when pages move, instead of just dropping the link, they often leave behind a redirect to the new location. Microsoft, on the other hand, uses a URL that seems a little daunting - if not proprietary. My dilemma is that right now, the content on the Wikipedia page lacks any real meat while the Microsoft URL has the actual information I am referring to. I'm sure their addressing scheme makes sense to them but I certainly can't read it - not without a better understanding of their information structure.

Another link I included was for Cocoa: http://developer.apple.com/library/mac/#documentation/… and while the actual URL is even longer :) it seems human readable. Even if the link goes dead, a farily astute human could likely google terms from the URL to find the new URL.

In this regard then, +1 if you keep your URLs human readable. I know they'll be around for along time but I'd prefer to avoid directing all my links to http://www.wikipedia.com/ or http://www.amazon.com/. No, sometimes I want to take you right to the source. I'm not trying to sell anything - I don' t need all these levels of indirection or advertising for my readers.

PS: what I really need to do it implement my own version of http://bit.ly and then monitor the links I publish. Then, if any of the links change content - it'd send me an alert and force me to find the new location! Heck, sounds like idea for a service of some sort …

Filed under  //   embedding-urls   wikipedia  

Comments [0]

A Weekend of Windows

One of our larger projects here requires native ports to multiple platforms. I spent this weekend creating the skeleton for a Windows windowing framework.

I am not trying to keep the code portable but I did try to follow some fundamental Cocoa Design Patterns. I ran into a little difficulty as C++ and the original Win32 API aren't a 1-to-1 match to Objective-C and Cocoa, but I was able to mimic the NSWindow object hierarchy and complete a naive retain and release mechanism.

I'm not sure why but I get the biggest kick from programming GUIs with Windows' API. I finished in as much as I was able to display the root window frame. I then popped open Interface Builder and started puttig the actual GUI together :) Funny how that works sometimes.

Filed under  //   cocoa   interface-builder   windows-api  

Comments [0]

Use the Other Side of Your Brain!

If you use a computer mouse daily - try finding a way to control the computer mouse with the opposite hand every other day.

It cuts any type of repetitive stress usage down by 1/2, it works the opposite side of the brain and it is much easier than learning to write with your opposite hand :)

Personally, I work at home with my 'left' hand on the mouse - while at work, I use my right. They almost balance each other out perfectly.

Comments [0]

Conference Call Headphones

Do you use Skype for conference calls?

I recently received a pair of usb headphones and find them really helpful to direct Skype to ring on my built in computer speaker while I participate (talk and listen) over the usb headphones.

That wouldn't be possible if I was actually using the mic and speaker jacks on the computer.

+1 Logitech!

Filed under  //   headphones   skype  

Comments [0]