Posts tagged as "productivity":

Using Gist to Keep Task Synced

August 13, 2008

The folks at GitHub recently launched Gist which may well be the best code sharing/pasting tool ever. It has nice syntax highlighting and a plain user interface plus you can share more than one file in the same paste or gist. In addition to this you have the ability to create a ‘private’ gist. The quotes are because they are private only by obscurity not by any authentication logic. A SHA1 (I think) key is created and they use that as the url to you new, small git repository but they don’t show up in the view of all gists and a SHA1 is pretty unlikely to have it’s value guessed correctly.

Gist by itself is great news and a useful tool but the thing I find really appealing is that I can use it to keep simple text files in sync across multiple computers. This is incredibly useful to me because I typically track my work hours in a simple text file because our timesheet application is pretty horrendous to use and I want to deal with it as few times a week as possible. So I created a new private gist and added this time tracking text file and now I don’t have to worry about having my hours at work but not at home or vice versa because I can just pull from the private gist. Not only that but now my time tracking sheet is versioned so I don’t have worry about losing notes I make about how I spent my time in the unlikely event someone asks I can find it.

This was a grand breakthrough for me and I was quite pleased. Lately though I got to looking at some task tracking software and found some great ones but I am reluctant to pay for software I know I’m likely to stop using after a little while. Of the free options I didn’t find any which would allow me to easily sync my todo list from my home computer to my work computer. About this time I remembered a shell script I had used about a year ago which tracked all the information in simple text files. After a little looking I found Todo.txt - Task tracking for command line lovers. I dug around for the script on my computer and tried to update it but whenever I listed out my tasks I had this -e being printed in front of the first one. I’m fairly certain it was a misplaced sed argument but with all the regular expressions in the shell script I didn’t want to break things worse. I tried to search for the problem and came up empty on the mailing list but did find a link to a todo manager called Task which even provided an installer for Leopard!

Once I installed the package it was a simple matter of updating the configuration to write files to the directory where my time tracking gist was already located and TADA! easy syncing of time and tasks across multiple computers using the magic of the command line.

How-To: Adding Foldings to Javascript Files in MacVim

May 20, 2008

Having used TextMate for a while I have grown quite accustomed to being able to fold sections of code, particularly function declarations, so I can glance through the file to see what functions and variables I have defined. However, I recently made a totally nerd bragging rights based decision to test out MacVim. Well it wasn’t all bragging rights, being able to navigate a file without having to move my fingers from ‘home base’ would be a big plus.

The project I’m currently working on though has a couple of really large javascript files and navigating them quickly in MacVim without the foldings was something I found to be quite difficult so I started looking at the Vim help files and found the ability to create folds. Due to a disciplined use of tabs to indent code blocks :set foldmethod=indent worked fairly well but eventually it started to bug me because the of the fold was actually the first line of the content which meant the folds looked something like functionName: function() {
+ - - if (test) {
},
There had to be a better way. I realized what I wanted to do was create a fold on the line with the function declaration down to the line with the ending brace. I could not find an easy command to do this so I created a simple javascript filetype plugin (addfoldings vim plugin).

In order to get this to work I had to add filetype plugin on to my .vimrc file and I had to create the ~/.vim/ftplugin/javascript directory and drop the addfoldings.vim file into it. By default the foldings are all open but they have been created.

Update: Things are of course never as easy as they seem. The above works fine as long as you don’t add lines to the file you’re working on which is of course absurd, additionally it won’t update the foldings as you go which sort of limits the usefulness. Hopefully I’ll be able to update this to be more useful.

Stuck To It; Using Stikkit

April 27, 2008

Recently I’ve been making a lot of use of a site I found a while ago called stikkit. Stikkit is basically a online cork board for post-it notes. At least that is how I’ve come to think about it. So essentially I’m using it for everything from storing links I want to revisit later but don’t necessarily want to bookmark to keeping freelance hours logged.

This process of keeping stikkits up to date and useful is made even easier but a great dashboard widget which uses your api key to access your stikkits in order to display and update them.