Posted by: amychr | 29 April 2009

Rename files the easy way in OS X

Can’t find that unix rename command to change filename in batches? Here’s a way to do what you need without rename in the terminal.

Step 1: try out the command first without hurting any files!

ls foo*.jpg | awk '{print("mv "$1" "$1)}' | sed 's/foo/bar/2'

This will just print out a list of changes that could be made. foo*.jpg is the search for files to change. foo is the text to search for and bar is what to replace it with.

Step 2: Ready to make some changes? the same command as before with a little extra will change all those filenames with no need to open automator.

ls foo*.jpg | awk '{print("mv "$1" "$1)}' | sed 's/foo/bar/2' | /bin/sh
Posted by: amychr | 17 February 2009

PyStones done

I finally finished PyStones today! (well.. it does what it’s supposed to without crashing anyway.) All the major problems are gone and it should work now in any *nix/Mac environment with python. Download version 12 now!!

Posted by: amychr | 19 January 2009

You Can Use Your Console For That

In the spirit of promoting linux applications for Mac and others, here are some apps which do a surprising amount without ever leaving your console.

  1. Irssi – irc chat with heaps of features
  2. Canto – rss feed reader
  3. CenterIM – multi-protocol instant messenger
  4. Mutt - mature and powerful mail reader. “All mail clients suck. This one just sucks less.”
  5. Mplayer – the swiss-army-knife of media players. Ok, it does require X to see the video, but you get the idea.
  6. mpd with ncmpcpp – flexible, lightweight music server and controller
  7. PyTone – python-ncurses based jukebox
  8. feh – set your background or view a slideshow
  9. beeswax – keep track of tasks using the GTD method
  10. sgtd – more of the same
  11. vim – the only editor a programmer will ever need. There’s good reason to use vim instead of vi. Trust me.

Most of these are available in pacman if you’re using Arch linux, or in the AUR. Some, like Beeswax are ready to be compiled on a mac with only a few changes.

Posted by: amychr | 5 December 2008

moviestar has a new home

It’s come to my attention that moviestar is no longer downloadable from Macupdate. This is (for once) my fault since I never updated the link there. I’ve moved the project to a new home at googlecode where it is once again available for download. Here are the updated links:

Moviestar at googlecode

Moviestar download

Posted by: amychr | 13 November 2008

setting up MPD

Setting up the Music Player Daemon (MPD) can be easy and fast with a little help. Here’s what to do to get it going after installing it (with apt, emerge, pacman etc):

rm /etc/mpd.conf
(just in case)
vim /etc/mpd.conf
(put in it and change to suit)
music_directory        “~/music”
playlist_directory    “~/music/playlists”
db_file                “~/.mpd/db”
log_file            “~/.mpd/log”
error_file            “~/.mpd/error”
pid_file            “~/.mpd/mpd.pid”
state_file            “~/.mpd/mpdstate”
user                “youruser”
bind_to_address        “127.0.0.1″
port                “6600″
(save it and close)
mkdir ~/music
mkdir ~/music/playlists
(if you need to)
touch ~/.mpd/mpd.pid
mpd –create-db
(if this doesn’t work, check the user in mpd.conf)
mpd

To get it to run on bootup: (for Arch linux)

add mpd to /etc/rc.conf to have it on boot up.
(in the DAEMONS line)

Older Posts »

Categories