Git Hosting is Overpriced: DIY on the Cheap

GitHub is great, and has basically surpassed any other project community. I get why it’s popular, and I use it myself for open source projects, but the fact is, it’s way too expensive for non-public projects.

I looked into a bunch of other Git hosting solutions, and they all have the same crappy bottom line: $8/month. BitBucket has a free plan for a small number of collaborators, but that’s a bother, as you still have some strange licensing restrictions. The fact is, for a few bucks more, you can solve your own problems and get much bigger bang for your buck.

You’ve got a few options, but they all boil down to the same point: Get a cloud server for ~$10 a month. I’ve used Rackspace Cloud before with no problems, but I imagine they’re all more or less the same. If you’re a Linux newbie, there’s tons of tutorials for Ubuntu configurations that will show you how to set up almost any git server in very little time without learning too many Linux internals.

There’s a ton of benefits to getting a cheap cloud server:

  • You’re paying only a few bucks more than dedicated repository hosting
  • No restrictions on the number of users, repositories, or anything like that
  • Full control of anything you want on the server
  • You can always install something with a pretty web GUI, if you’re into that.
  • Most cloud server providers have cheap automated backup, so you don’t have to worry about an accidental rm -rf
  • Split the $10 a month cost with your buddies, and let them use it for whatever the heck they want too.

Of course, if you’re into setting up some hardware, pretty soon $35 will take care of all of your file hosting needs forever, provided your ISP is keen on that sort of thing.

Posted in Software Development | Leave a comment

The Switch: XFCE from GNOME 3

I never really hated GNOME 3. I can’t say I was ever overly thrilled with it, but I feel like it gets innovation right to some level.  I was willing to put up with Alt-`, no taskbar, and wonky dual monitor support  in the name of “innovation,” but there was one thing I could never get used to: temporary notifications. If you happen to miss a notification, you can lose track of an IM conversation for quite a while.

I eventually got frustrated enough with Empathy (the XMPP support is really lacking, and the whole thing felt buggy to me) to switch to Psi, which led me to another realization: tray icon notifications were now completely useless, and I’d be stuck with Empathy forever, as it seems to be the only one to support the (frustrating) GNOME 3 notifications.

Well, I’ve had enough. I decided to cut the cord two days ago and it’s been smooth sailing since. I’d share some screenshots, but I’ll make it easier for you: it looks exactly like GNOME 2.

While I eventually got frustrated with GNOME 3, it did have some features I liked. Luckily, most of those were easily replaced:

  • Kupfer (http://kaizer.se/wiki/kupfer/) is in the AUR, and is a welcome Gnome-Do/Quicksilver/whatever clone (since GNOME-Do is conspicuously absent in all Arch repositories)
  • xfwm4-tiling (https://aur.archlinux.org/packages.php?ID=40030) or the patch linked from that package provide the “aero-snap” functionality that Windows 7 Aero and GNOME 3 provide
  • Panels can be tweaked on each monitor to show only open windows (think UltraMon on Windows)
  • I actually tweaked the virtual desktops to match GNOME 3 style, since it interferes with the -tiling patch otherwise
Both XFCE and GNOME 3 aren’t perfect, but it’s actually nice to have a bit of freedom outside of the GNOME 3 workflow-box for the first time in a while. Sure, there’s still some bugs (why do my desktop icons only fit on space common to both monitors?), and sure it looks a tad bit dated (it’s as close to a GNOME 2 ripoff as you can get), but for the first time in a few months, I don’t feel like my desktop environment is choking me.
Posted in Linux | 1 Comment

LabHelper

Recently I found myself in a position where I needed to have a bit more control over Lab computers – more specifically, normal screen sharing is a bit useless in a coding lab, and I found that students often wanted to use laptops instead of existing lab solutions.

LabHelper is a solution that runs through some central server. The client and server are pretty small. It’s a bit messy, but should be fairly extensible.

LabHelper on GitHub

Posted in Code | Leave a comment

Export Picasa 2 Albums to Folders

I recently needed to move some Picasa 2 albums from an old computer to a new one given only the old files and album files. I’d about had it with albums, so I wrote a Python script to convert .pal (Picasa albums) into regular folders.

It chokes on unicode, but dumps errors to a file for you to resolve them – just run this in a directory with your .pil files and it will create subfolders for each album and copy the pictures into them, as well. Use at your own risk.

#!/usr/bin/python2
from xml.dom.minidom import parse
import os.path
import shutil

PICTURESPATH = "C:\\Users\\User\\Documents\\oldcomp\\My Pictures"
ERRORS = open('errors.txt','w')

def populateFolder(albumName):
    global PICTURESPATH
    global ERRORS
    doc = parse(albumName)
    title = [x for x in doc.getElementsByTagName("property") if x.getAttribute("name")=="name"]
    title = title[0].getAttribute("value")
    files = map(lambda x: x.childNodes[0].nodeValue, doc.getElementsByTagName("filename"))
    translated  = map(lambda x: os.path.expandvars(x).replace("$My Pictures",PICTURESPATH), files)
    try:
        os.mkdir(title)
    except:
        ERRORS.write("Cant make directory " + title)
    for f in translated:
        try:
            shutil.copy(f, title + "/")
        except:
            ERRORS.write("Error in album %s: %s\n" % (title, f))

def main():
    fileList = filter(lambda x: ".pal" in x, os.listdir("."))
    for cFile in fileList:
        populateFolder(cFile)

if __name__=="__main__":
    main()
Posted in Code | Leave a comment

multiftp – a Multi-Threaded Command-Line FTP Uploader

Overview

multiftp is a multi-threaded (multiprocess) command-line FTP uploader that allows easy recursive uploading of directories. It provides an easy way to schedule fast FTP uploads via batch scripts.

Features

  • Easily script multithreaded FTP uploads
  • Works via multiprocessing to circumvent threading problems.
  • Automatic recursive uploads
  • Ideal for situations where you need to upload an entire folder in script (i.e. publishing a website via FTP).

Usage

Run mtftp.py -h for a help file.

Requirements

  • Python 2.7.x+ (not currently Python 3 ready, but the changes are probably minimal)

License

The software is licensed under the MIT license, whose text can be viewed in the program source.

Download

Get the code here.

Posted in Code | 2 Comments

Fix Dual Monitors in GNOME 3 (aka My Workspaces are Broken!)

Note: See update for GNOME 3.3/3.4 at the end of this post.

I’ve already expressed some disappointment in the default multi-monitor behavior in GNOME 3 on the dev’s blog (read: I posted an angry rant in the comments).

Basically, in GNOME 3, for some reason, they decided the typical use case was for the secondary monitor to stay fixed when switching workspaces, which is the complete wrong setup for someone using dual monitors.

Luckily, as Pascal points out in the blog’s comments, there’s a setting for this, and the other (ie correct) behavior is actually mutter’s default.

Luckily, the fix is pretty simple, and will allow workspaces to switch on multiple monitors again!

  1. Download gconf-editor – this is probably available in your distribution’s package manager.
  2. Start gconf-editor – the “Run Command” menu is still available in GNOME 3 by pressing Alt-F2.
  3. In the tree on the left, navigate to /desktop/gnome/shell/windows
  4. UNCHECK the box next to workspaces_only_on_primary

You’ll need to log out or restart to see the changes, and some commenters in the above post seem to note some small issues with the setup, but all-in-all this has been completely functional for me; and best of all, I can use both monitors again!

Update for GNOME 3.3/3.4

Cedric Briner emailed me to let me know that for GNOME 3.3/3.4, the command has been updated. The new command is (instead of gconf-editor):

gsettings set org.gnome.shell.overrides workspaces-only-on-primary false
Posted in Linux | 37 Comments

Get a Taskbar in GNOME 3/Gnome Shell

Disappointed in the lack of taskbar in GNOME 3? Well, it’s back!

Some people I talked to were disappointed in the lack of a taskbar in GNOME 3. While I’ve gotten used to it, it’s easy enough to get a taskbar back.

Tint2 is  a project that I was using for a taskbar when I was strictly using OpenBox.

I was surprised to find that it works perfectly with GNOME3 – it even respects the bar on snapping windows to the sides and maximizing.

There’s no autostart applications icon, but the Arch Wiki has a workaround so you can start tint2 automatically.

Posted in Linux | 6 Comments