May 2008: all entries
   Reclaiming 2+ gb of disk space
   Vim: lazy match on wildcard
   The Squid

I just ran a manual cleanup of non-English language packs from my Applications directory. Removing the additional language junk saved 2.62 gb (yes, gigabytes) of disk space. Update: I ran it on /Library, too (same steps as below, just modify step 2), freed up another 1.1 gb, bringing the total disk space to 3.72gb.

Size of "Applications" before: 6.41 gb (6,220,745,877)
Size of "Applications" after: 3.79 gb (3,879,507,421)

Note: the following tip will permanently delete non-English language support from everything in your Applications directory. In the interest of full disclosure, I'm just pointing that out. If, for some reason, you need to recover the addtional language support (maybe you're learning Hungarian?), you'll need to re-install the application(s).

Here's what to do:

1. Open Terminal window
2. Run this: cd /Applications
3. Run this: find . -name "*.lproj" ! -name "English.lproj" ! -name "en*.lproj" -exec rm -rf {} \;

I wrote about this before -- Removing language support from OS X applications (to free up disk space) -- but just re-ran it on my current computer so made another post with current data.

Vim: lazy match on wildcard
more from dev
May 8, 08

Got a question about vim pattern matching that I had to look up, probably worth sharing.

Say you have the following text, and you want to modify the quoted things, so you start with this:

blah blah blah "BLAH" blah blah "FOO" blah blah

And want to end up with this:

blah blah blah <"BLAH"> blah blah <"FOO"> blah blah

Run this:

:%s/\(".\{-\}"\)/<\1>/g

I expected ".*?" to work (valid Perl regex syntax?), but ultimately found ".{-}" worked with Vim (and don't forget to escape the "{" and "}" characters, so \{ and \}).

The Squid
more from blah
May 2, 08

This keeps showing up in the news, today noticed a link to Te Papa, the museum in New Zealand where the squid is being inspected. Lots of photos and info there. Also found this link with more stuff: Colossal Squid.