January 2012
2 posts
1 tag
Overriding ruby module methods
I learned something new about Module.include the other day. Consider the following: https://gist.github.com/1640500 It outputs chicken as I would expect since it was the last one included, but it also does one more thing that I didn’t expect. It sets up a method inheritance chain for duplicate methods so you have access to the method you have overridden. So if we call super in our...
Jan 19th
1 tag
Control Tabbing with Vim
Every once in a while I’ll go down the rabbit hole of trying to get proper control tabbing working in vim. If you’re not familiar with control tabbing through files in your editor think of it the same way as command tabbing through applications is osx or alt tabbing in windows. All the files that you’re working with are in a stack and the most recently used ones stay at the top....
Jan 16th
2 notes
July 2011
1 post
1 tag
How fast can you get it up?
So with OS X Lion just around the corner I’ve been thinking about the steps to get my computer up and running from a fresh install. You do do a fresh install, right? I’ll be testing these steps out in the next couple of weeks, but here’s what I have in my head… install OS X development tools (do I have to buy this now from the App Store?) install iTerm (because...
Jul 15th
4 notes
February 2011
1 post
3 tags
My obligatory post on webOS
So it seems the cool thing to do in the webOS dev community is to write a blog post about their view on the webOS announcement this week…so here’s mine. History The first time I ever used a Palm device was around April of 2010, so I’m not a Palm lifer. The company I was working for at the time was building mobile apps and a webOS app was one of them. I was skeptical at first,...
Feb 11th
14 notes
1 tag
backup backup backup
I’ve gone through many variations of my backup strategy since I started storing things digitally. Here is my current setup… The master copy is stored on my iMac’s local disk. Everything except music and dvds are synced with dropbox. Everything is one way synced to external drive 1 via chronosync nightly. External drive 1 is cloned to external drive 2 via superduper weekly. I...
Feb 26th
January 2010
1 post
1 tag
changing git commit messages
Changing your last commit message in a git repository is fairly trivial git commit --amend -m "some other message" but what if you’ve made several commits and want to change a message that’s not the last one? An interactive rebase is one way to do this. First find the commit just before the message you want to change ~/Work/repo (master) $ git lg * 6119426 - (master) third commit (3...
Jan 29th
1 note
November 2009
1 post
1 tag
git add...all of it damn it
So we all know that git add . will add all new and modified files to the index. What about the 50 files you deleted that you also want to stage? git rm 50 times? How about adding the -u option to git add which will stage modified files and also deleted files? The one problem with that is it doesn’t add new files. So if you want to stage all new files, modified files, and deleted files then...
Nov 6th
5 notes
September 2009
3 posts
2 tags
TextMate not finding your gems?
If you’ve built ruby yourself and stuck it in /usr/local/bin you may run into a problem where textmate is using the pre-installed version of ruby. That will result in searching for gems in the pre-installed location (wherever that is) To fix this add a shell variable called TM_RUBY in the advanced preferences of TM pointing to /usr/local/bin/ruby
Sep 23rd
1 tag
track git remote branch (note to self)
git config branch.master.remote origin git config branch.master.merge refs/heads/master
Sep 23rd
3 tags
Eclipse vs. IntelliJ
I’ve been a looong time eclipse user and have tried intellij off and on over that time. I never really got hooked on intellij like some people I know…until recently. I’m not sure why it stuck with me this time, but this post will serve as my list that I can point people to when I get asked “the question” IntelliJ - The Good Selectable color themes (absolute pain in...
Sep 16th
August 2009
3 posts
2 tags
git integration not working in textmate?
So you installed projectplus or the git bundle for textmate and it doesn’t work? Try setting a TM_GIT shell variable (located in the advanced properties) to /usr/local/git/bin/git.
Aug 16th
2 tags
svn:externals in git?
For all the benefits git has over svn, I found one thing that I was missing…svn:externals. There are a few suggesstions that you come across when searching around on this topic, one being git subprojects and another being git submodules. I couldn’t find (read lost desire) a whole lot on subprojects, but from what I got out of it is you just do a git clone of your external project in...
Aug 13th
1 tag
git pull with uncommitted files
Suppose for whatever reason you need to pull in changes from a remote repository and you have uncommitted files that you don’t want to commit. Git won’t let you do that if it needs to merge changes to one of your uncommitted files. Try this… git stash git pull git stash pop
Aug 12th