HipChatter

If you’re doing any work with the HipChat API you may want to check out this handy node.js wrapper from TBWA Worldwide / Pilot developer Charlton Roberts. We’re currently using it fire off deployments and other fun stuff directly from our HipChat room.

You can find it on GitHub and npm:
https://github.com/charltoons/hipchatter
https://npmjs.org/package/hipchatter

Update MacPorts, Ruby Gems, Node Packages and Python Packages with One Command

Off topic but still helpful…

Like many devs I make use of a variety of open source software, package management tools, etc – all of which need to be updated on a regular basis to stay up-to-date with the most recent releases.

Rather than manage each one individually, a simple alias in your ~/.profile comes in very handy:

alias getuptodate='sudo port selfupdate; sudo port upgrade outdated; sudo port uninstall inactive; sudo gem update –system; sudo gem update; sudo npm update uglify-js -g; sudo pip freeze –local | grep -v '^\-e' | cut -d = -f 1 | xargs sudo pip install -U;'

view raw
update.sh
hosted with ❤ by GitHub

Notes:

  • I haven’t been able to find a command to update all installed Node packages at once so I’m listing them individually for now.
  • This assumes that npm is installed via MacPorts.
  • Unfortunately this fails when pip freeze lists a package that can’t be installed from PyPI anymore.

Then you can simply invoke it like so…

$ getuptodate
Password:
> Updating MacPorts base sources using rsync
MacPorts base version 2.1.2 installed,
MacPorts base version 2.1.2 downloaded.
> Updating the ports tree

view raw
run.sh
hosted with ❤ by GitHub

Of course if you need to handle specific versions of a port or gem individually, this won’t work for you. But if you just want to be current on everything, this will do the trick.