Setting up a private Git repo with Dropbox

So you’re at that point in your life where you need to have a git repo for your project but you can’t use github because it needs to be private and you don’t want to pay. Well, you can actually set up your own repo fairly easily using Dropbox.

You’ll need a terminal prompt with git installed to do this. Linux users can simply install git and they’re good to go, Windows users should look at http://code.google.com/p/msysgit/.

First, find out where your dropbox files are located.

Cd to your dropbox folder and make a directory for your repo, then cd to it.

Run ‘git –bare init’ to create the repository.

Cd to a folder in your projects directory, and run these commands:

‘git remote add dropbox file://path/to/your/dropbox/dir/arepo’

‘git push dropbox master’

Congradulations, you’ve created a git repo!

Now, to check it out from another computer you just need to run this command:

‘git clone -o dropbox file://path/to/dropbox/repo’

Now you have your own private git repo.

Posted: September 12th, 2012
Categories: Programming
Tags:
Comments: No Comments.

Congratulations!

You’re viewing a blog post! Amazing isn’t it? I, a person in suburban America, can write content that can be viewed by you, a person in an Antarctica crab shack.  (they have crabs there, right?)

You barely had to do any work to get here. All you had to do was type a URL into your browser and press enter (or click the little arrow  next to the URL bar if that’s your thing)

However, your poor computer had a gigantic workload ahead of it when you pressed enter. Let’s look at what happened.

  1. Your computer scanned it’s hosts file to see if it already knew where my server lived (it probably didn’t)
  2. It asked your router whether it knew where my server lived (it probably didn’t)
  3. It asked the global DNS server where my server lived (it knew)
  4. Your computer bounced your connection through a bunch of other servers to get to mine (unless you happen to live right next to my server)
  5. It asked the server if it’s alive
  6. After waiting ages (in computer time), the server responds back that it’s alive
  7. The computer tells the server okay
  8. The server tells your computer okay
  9. The computer tells the server to send you the contents of this page
  10. The server sends it
  11. Your router recieves this and sends it to your computer (Note: this happens at a bunch of steps, I only wanted to include it once though)
  12. Your computer recieves it and sends it to Chrome/Chromium or Firefox or (gasp) Internet Explorer
  13. Chromium (because it’s the best) sends the raw HTML/CSS code to webkit to parse
  14. Webkit parses the webpage (this takes forever). V8(javascript), Flash, Java, and other plugins are called in as needed to parse dynamic content
  15. Webkit passes the rendered webpage back to Chromium
  16. Chromium tells the computer to blit pixel 0,0 with some color
  17. More pixel blitting
  18. More pixel blitting
  19. Even more pixel blitting
  20. New! More pixel blitting, completely free!
  21. More pixel blitting
  22. The above steps a bazillion more times (even more if you have a big monitor)
  23. Your webpage is displayed

Please, give your computer a break sometimes. It does a lot of work for you.

Posted: August 29th, 2012
Categories: Uncategorized
Tags:
Comments: No Comments.