Tag Archives: software

Why I Use Sublime Text

I’ve always been a vim guy. Try as I may, I just can’t get myself to like any full IDEs. I’ve tried large projects like Eclipse and Aptana and small editors like Blue Fish and even gedit, but nothing has ever made me leave the comforts of vim.

Despite my love for vim, I don’t think it’s perfect. I’d like something more like a desktop editor with the features of vim. My friends over at Cards.ly (R.I.P.) use Sublime Text 2 and I liked what I saw. Not enough to commit to switching, but I spent some time with it and liked it myself.

Then I bought a Mac. Why does this matter? Well, I never got used to navigating in vim with the letters and such, opting instead to use the arrow keys, as well as page up/down and and home/end. On a mac, the latter keys don’t exist, and I find getting the functionality painful. So there were two options; learn to navigate vim with the keyboard letters or switch editors.

I opted for moving to Sublime Text, partly because it looked really nice, partly because it would give me a unified, cross-platform editor, and partly because I knew I could enable some of the parts in vim I’ve always missed from other editors. So far, I’m sold. Literally, I bought a license and everything.

It wasn’t all cupcakes and puppies from the start though. For example, I blew away a directory with a mis-click (there’s no confirmation dialog?!). But I quickly got used to it and haven’t really looked back. I even forked the coffeescript tmbundle and got it working for in-editor compilation. Check it out!

Sublime is pretty usable out of the box, but there’s some things everyone will want to do before making real use of it. The biggest one is Package Control (#7 on that list). This will allow you to install bundles and plugins and such directly through Sublime. This will make i teasy to add functionality to the editor. For example, if you work in node.js, you probably use things like Jade and Stylus, and maybe you work in CoffeeScript. Sublime doesn’t give you syntax highlighting or anything for these out of the box, so you could go hunt down the stuff you need and install them by hand, or type in 1 command for each and have them working in a couple seconds.

That nettuts link above has a number of other nice things you can do, but I honestly haven’t done most of them. For me, Package Control, the Made of Code theme and some personal settings tweaks and I’m ready to roll. It’s a great editor and it’s very easy to get used to. If you’re unhappy with your current setup, give it a shot, it’s free to try so you’ve got nothing to lose.

Hello There, Windows Phone

I went to a “Node Bootcamp” hosted by Microsoft yesterday. As I had expected, there was a lot of talk about Azure, which is ultimately where we were supposed to upload our projects. They spent the first part of the morning talking about Azure, and the later part showing how to write a simple Node app using Cloud9 (keep on eye on them). Then in the afternoon we were left to our own devices to create something in 3 hours with Node.

I was a little upset with the lack of assistance from the people hosting when it came time to code, but a few people had some pretty cool things built anyway, and with no prior experience. I guess that’s the beauty of Node; if you know Javascript, you’re already most of the way there, you just need to get familiar with how Node uses it.

I took the time to finally play with socket.io, opting to build a realtime chat tool (how original) and was really impressed with how easy it was to use. I couldn’t get it to run on Azure, I think because of connect-assets, but they let me demo my app on my local machine anyway. Then they judged what people had created and gave out some prizes for the ones they liked the most. My little socket.io chat thing earned me an HTC Surround!

I’ve been wanting to play with Windows Phone for a while but nobody I know has one. Recently, however, another friend of mine won one and I finally got to play with it. I was blow away with how responsive the interface was! But of course, it’s hard to judge a phone with only a couple minutes of handling it. Now that I have my own, I’m going to use it as my primary phone for a week and write up my thoughts. Blog post forthcoming!

Git Flow

Git flow is basically just a shell script that automates some parts of git. But the parts that it automates make it pure bliss to use. From Jeff Kreeftmeijer’s blog post on the subject:

I’m astounded that some people never heard of it before, so in this article I’ll try to tell you why it can make you happy and cheerful all day.

That post is decent introduction in to how to use git flow. The idea is simple; everything is developed in the develop branch, but you work in smaller sets on features, which get their own branch until they are merged back in to the develop branch. When you’re ready to do a feature freeze and start squashing bugs, you create a release branch, and once the code is ready to go live, changes in that branch get merged with master and back to develop. If something breaks on production, you hotfix it and merge those changes back to develop as well. This graph, taken from this excellent presentation, is a pretty solid summary of the flow:


Continue reading

More Git Magic

I recently had a chance to watch Gary Bernhardt’s git workflow video and was blown away by a lot of the aliases he has set up (and by his workflow!). One of the coolest and most useful things he had setup was a log viewer that showed commits, their paths, the author, when it happened, comments and the branch they are attached to. Example:

You can see my git-flow (an awesome project on it’s own, blog post forthcoming) workflow in there on the left; see how the repo was branched and merged back in? As I said, crazy useful.

Setting this up was pretty simple too. Simply grab Gary’s .gitconfig and .githelpers dot files and toss them in your home path. Or, better yet, just copy everything but the [user] data from the .gitconfig and toss it in yours. Then fire off a `git ra` and marvel are the glory!

Easy Screenshot Sharing in OSX

Now that I’m using a Mac, the screenshot uploader I wrote isn’t all that helpful. Shame, I was really enjoying the quick and easy screenshot sharing. Fortunately, OSX has some built-in hotkeys for taking screenshots. What’s more, you can change where they save. What’s even more, you can add scripted actions to folders with Applescript. Mix in a little Dropbox, and BAM, I’m sharing screenshots with the greatest of ease!

The flow goes like this: Capture screenshot (selection, window, screen, whatever), it gets saved to my Dropbox Public folder, the link gets copied in to my clipboard, and I get a Growl notification when it’s all ready to go. Here’s how.
Continue reading

Tweaking Gnome for Low-Resolution Displays

I’m a fan of Ubuntu, and I’m kind of lazy about setting up my desktop, which means I’m using Gnome as my window manager. Over the years I’ve grown to like it… it’s not perfect, but it’s livable and works pretty well. One of the problems I’ve always had with it, though, is all of the window elements in it are huge. This makes it look kind of childish and eats up a lot of screen real estate on the 1280×800 display on my desktop. I couldn’t even imaging running it on a lower resolution!

I was discussing this with my friend Jason and he recommended playing with the font sizes. Sure enough, that did the trick! It seems that the reason everything is so big is that the default font sizes are 10pt. I shrank them down and MAN does it look nice now!

You can edit these values one ways; via gconf-editor or via gconftool-2 on the command line. I won’t post the gconf-editor direction since, if you know your way around it, you can extrapolate the parts you want to edit via the gconftool-2 commands. The following settings worked extremely well for me, but you can adjust the font faces and sizes as you see fit.

gconftool-2 --type string --set /apps/metacity/general/titlebar_font "Sans Bold 8"
gconftool-2 --type string --set /desktop/gnome/interface/font_name "Sans 9"
gconftool-2 --type string --set /desktop/gnome/interface/monospace_font_name "Monospace 9"

This will adjust the title bar, all normal window text and all monospace text, respectively. Again, these numbers looked the best to me, but you can make them even smaller (or bigger) to fit your needs. I did these adjustments on my 1680×1050 display as well, and it looks amazing. Then again, I love small text!
Continue reading

Living with PulseAudio via PulseAudio Device Chooser

Telecommuting is a pretty sweet gig with a good number of benefits. To name a few, while I’m working I can:

  • Toss some laundry in the machine
  • Start my lunch and work while it cooks
  • Sign for packages when they are delivered

And that’s just the tip of the iceberg. However, to make telecommuting possible, there are some technologies I simply MST have working. VPN is a big one, so I can get at the computers back in the office. SSH and FTP access is important to manage servers and files. And of course, I need to communicate with people; for that, we use AIM and Skype. Up until recently, it’s been enough for me to use my Nokia N800 to make my calls back to the office. It’s no good for chatting with video though, so I needed to set it up on my desktop with my camera and, preferably, my headset.

Simple enough task really; both my Logitech webcam and Plantronics headset work out of the box with Ubuntu (at least in 9.04) with nearly zero configuration required. I just plug them in, tweak Skype quickly and I’m up and running. However, with the addition of PulseAudio in the more recent version of Ubuntu, this became a little trickier.
Continue reading

Remote Backups with Amazon’s S3

Recently, my SATA controller on my RAID box failed, silently corrupting my entire array. Fun stuff, I assure you. Luckily, I had backed up the array about a month before the failure and was keeping a nightly rsync running. I had a few things that weren’t included in the rsync backup, but I didn’t really lose much data. So, again, backups saved my ass!

But, I’ve been aware for a while that regardless of how much I back up, I still have everything in one place. If there were a fire or a robbery, I’d be completely SOL. This fact has prompted me to look for some free or very low cost online file storage services. Most of the ones I found required you to run their software for them to work. This wasn’t very desirable for several reasons, the most important being that I run Linux and most of the services didn’t have a Linux client to use. But even more than that, I wanted to be the one in change of the backups, something that would allow me to just set up a cron job that would encrypt my data and ideally use rsync (via this script) to send that data. Unfortunately, I still haven’t found that, but I did find service that is both cheap and easy to use; Amazon’s Simple Storage Service!
Continue reading

Fallout 3 Terminal Hacker

I recently started playing the game Fallout 3 a little more and I came across a terminal I could actually attempt to hack. After a few failed attempts at it, I thought I would poke around on the Internet and see if anyone had any guides for hacking the things. Instead, I found this online terminal hacker, among others (this was the best one though). I thought, “man, that’s pretty slick, but I wish I has something that I could run locally in the event my Internet was down.” I poked around online a little and found a bunch of people claiming to be prepping downloadable, standalone versions, but nobody had yet delivered. Then I thought, “I bet I could write me own,” and that’s exactly what I did.

The rules for hacking the terminals are:

  • You get 4 tries, after which you can never try again
  • If you exit before the 4 tries are up, your available tries reset to 4, but so does the puzzle
  • For each word you pick, you will be told how many matching letters you got
  • That count is how many matching letters there are in the SAME position of the correct word

Originally, I was going to write it in Python. That way I could potentially execute it from anywhere I could install the Python interpreter and it would give me a reason to dive in to Python. Then I decided I wanted it done quick, and in an even more portable way; as a raw HTML page. So, I decided to write my version in Javascript, and here it is!

I used the one over at mediumexposure.com as a benchmark and honed mine down a bit (I didn’t catch that last rule when I was playing the game, which is why I could never figure the puzzles out). I will admit, mine isn’t as smart as his since it doesn’t take past guesses and matches into account, only the most recent guess and the remaining list of possible words. So, there’s a chance mine won’t guess correctly in the 4 attempts, but in the handful of tests I ran, I always managed to get it.

Now, I know what you might be thinking. “Hey, this is just another online file, how is this portable? How can I run it from my machine?!” Simple, save the html file to your computer and open it locally. All of the magic happens in the Javascript code (which I commented so you can follow along), which will run from your machine without the need for any extrernal processing or server. Go ahead, give it a spin and be sure let me know what you think in the comments. It’s a work in progress, so when I make it smarter, I’ll update the file and post again. Enjoy!

Building a Better CAPTCHA

CAPTCHAs can be good for stopping SPAM, but the last thing most of them are are usable. Don’t take my word for it, it’s a fact. One of the coolest ideas I ever saw was a HotOrNot mashup where you had to pick the three best looking ladies to prove you are a human. It was both usable and easy for a normal person, like my Grandparents, to use. That’s pretty unique and hard to come by, and that’s why I liked it.

One of the other easier CAPTCHAs I’ve used at work is a little dynamic images that asks you to do a little simple math. It’s an idea I saw on another site so I thought I would give it a try and it’s been extremely effective despite it’s ease of being broken. Surprisingly, it has completely stopped all SPAM coming through our contact form.

Another one I tried, much less effectively, is a colored word and a dropdown with a number of colors to choose from. It literally asks “What color is this text?” and offers a number of possibilities. This, however, was not effective for more than a week or so. The form still sees about one or two SPAM messages a day, which is especially strange because it’s a site that sees far less traffic. I think if I added more colors that weren’t even valid selections and changed the order it might be more effective, but I still need to find something better.

I’m thinking a system that would show three images and ask which one doesn’t belong could be usable, but it’s a little more difficult to implement; where do I get the images, how do I randomize the data, etc. I really like the HotOrNot CAPTCHA because the images always change and all of the images and data are crowdsourced, nothing for you to manage.

So, what can one do? Sadly, I don’t have an answer, but there is a lot of work being done on the topic. I think I need to just keep looking and mull this all over for a bit. We’ll see what I can find or come up with.