Web Developer Extraordinaire!
RSS icon Email icon Home icon
  • HAML + Javascript

    I am very meticulous when it comes to server calls. In most of my Rails applications, I make sure to only specify those Javascript files that are deemed absolute necessary for any given view so as to not clutter things with wasted bytes of memory.

    While I was playing around with HAML, I needed to insert a very simple, very specific jQuery function. As of this writing, a simple Google search of “haml and javascript” came up with some old and unhelpful results. The official HAML documentation was, of course, among those results, but the answer was at the bottom of the document and a quick scan of the table of contents didn’t associate “Filters :” as being the correct the section.

    Of course, a blog or two and the HAML google group already tackled the topic, so I’m just going to regurgitate in order in hopes that next person with this problem will find the answer in 2 minutes instead of my 10 minutes.

    An example:

    :javascript
      $(function() {
        $("#tabs").tabs();
      });
    
  • Textmate and Git Bundle

    I just recently had this problem and saw that the answer was buried in a TextMate blog entry comment thread.

    Are you getting the following error whenever you try to use the bundle?

    sh: git: command not found

    Did you install git through Macports or manually compile the source? Could your Git bundle for TextMate be a tad old?

    All of the above was true for me, but I was easily able to solve the issue with the following command:

    sudo ln -s /opt/local/bin/git /usr/bin/git

    Hope that cuts back on troubleshooting time for some of you out there!

  • Mac OS X Terminal Aliases

    Partly because I wanted to post more and partly because I transfer computers a lot and I figure a blog is as good place as any to share my thoughts with, well, myself.

    Here’s a list of aliases I’ve collected over the times searching the Internet (note: so far, not so many, but that’ll change as I keep finding more).

    To be put in ~/.bash_profile:

    alias ls='ls -aFhlG'
    alias ll='ls -l'
    alias search=grep
    alias ..='cd ..'
    alias ...='cd ../..'
    alias bake='/opt/local/apache2/htdocs/cake/cake/console/cake bake'
    alias cake='cd /opt/local/apache2/htdocs/cake'
    

    If anyone wants more detailed explanation of any or all of these, or if you’d like to know what in the bejesus I’m even talking about, post a comment.

    Oh, and I would also happily welcome further suggestions too.

  • Setting Themes for Terminal in Mac OS X

    After spending way too long using a plain black and white color scheme in Terminal and being unimpressed with the theme options under Terminal > Preferences… > Settings Tab, I decided to do a little bit of searching to remedy the situation.

    Read the rest of this entry »

  • iTunes Rating System for Album People

    After I started to get very weird songs pop up in my “4-stars and up” Party Shuffle playlist, I decided to embark on a more stream-lined iTunes song rating system.

    Here is my proposal:

    No stars
    This song is unrated and needs to be put in a smart playlist to be rated, even if they’re all 3 star ratings. This is a fire sale people. Everything. Must. Go! (out of that unrated smart playlist!)
    1 star
    Denotes a supreme dislike for the song that immediate deletion would not be totally uncalled for.
    2 stars
    This song is a’ight. Not the most inspirational piece of music, but not worth deleting either, if it flows with the rest of the album.
    3 stars
    This is a good song. Not the best, but you would be indifferent about it showing up once in a while during a shuffle. And hey, you wouldn’t be totally against bumping it up to 4 stars if it revealed a glimmer of potential to get stuck in your head.
    4 stars
    This song is great! Not only wouldn’t you mind hearing it in a shuffle of all songs in your library, but you’d be happy when it came on! Not only that, it warrants a place in your “Best of Artist” and “Best of Album” smart playlists.
    5 stars
    OMG! O-M-G! You love what’s happening to your ears right now! It’s, like, amazing and you can’t get enough. In fact, this is a song you want to share with everyone when you get the chance!

    Add any additional thoughts or suggestions in the comments.