RSS
 

Archive for the ‘Uncategorized’ Category

Helpful Applescripts to add and remove the current track from a playlist

13 Aug

I use these scripts, slightly modified versions of Doug Adam's, along with Quicksilver to maintain a few of my iTunes playlists. I can just type Ctrl+Cmd+c and the currently playing song is added my coding playlist.  I can similarly type Ctrl+Opt+c to remove the currently playing track from the coding playlist.

The shortcuts are done by using Quicksilver triggers to run these scripts.  I just put their path in it's path for discovery of applications.  If you have any questions feel free to ask.

Another neat trick is to change out the icon for the script.  You can set Quicksilver to show this icon for a second when an add or remove script is ran, which is useful.

The scripts are available here http://github.com/bclubb/iTunesScripts

 
 

Easy way to remove files from git index after deleting from the file system only

14 Apr

The easiest way I have fixed this is using git commit -am “your commit message here”

 
 

Testing a new rssmix

17 Sep

We are setting up a couple of our blogs at wprj to be posted on www.mtmjobs.com

 
 

Leopard Gem Update – Ruby head files not found

13 Jun

I just got my new macbook pro, so after I pulled down Textmate I was ready to start hacking on rails.  I fired up the command prompt and did a "sudo gem update" to get up to rails 2.1 so I could use git plugins and other great new features.  Well right after I kicked that off I started to get "can't find header files for ruby".  To fix this all you need to do is install xcode.  Also make sure you do that you do a gem install rails to get activeresource.  After this you should be good to go.

 
 

Rails Notes

12 Nov

I’m reading through Agile Web Development With Rails tonight and have come across a couple of interesting tidbits that may be good to know later.

When writing code in .rhtml files

<% 3.times do %>
  Test<br />
<% end %>

will result in the following html

Test<br />

Test<br />

Test<br />

to prevent this add a minus (-) before the close of the code sections to indicate that the last line break should be ignored.

<% 3.times do -%>
  Test<br />
<% end -%>

Also there is a helper method “h” that is really nice. It will parse any string into the markup required to cause the string to be rendered as it should. This eases site design and helps to protect from some hacks. So

<% h(“3 < 4”) %>

is translated to

3 &lt; 3

as desired.

Also something that is worth noting is that the views have access to all instance variables in the controller that calls them, even private variables.

 
 

Ben Hall’s Blog: MbUnit RowTest

18 Apr

Ben has a post about a pretty handy feature available in MBUnit.  You can create a test that accepts parameters and then user RowTest to define different parameters for the tests.  You can even specify what exception any particular parameter list is supposed to generate.

Link to Ben Hall’s Blog: MbUnit RowTest