BrT

Musings about technology and other neat stuff

BrT random header image

tms [fernLightning] - Very cool command-line utility to explore Time Machine backups (tags: leopard macosx timemachine tools )
(0)




Removing all extended attributes from a directory tree

May 7th, 2008 · No Comments   

Here’s a simple one-liner I came up with to remove all HFS+ extended attributes on all files and directories below the current one in Mac OS X. Useful before creating a tar file that will be shared with non-Mac users (tar in OSX will create additional “resource” files to store extended attributes, which when untared on a Mac will be correctly reinstated, but in other systems will leave spurious hidden files all over the place).


for i in $(ls -Rl@ | grep '^      ' | awk '{print $1}' | sort -u); \
   do echo echo Removing $i ... >&2;  \
   find . | xargs xattr -d $i 2>/dev/null ; done

The space after the caret in the grep command is produced by typing Ctrl-V and then Tab, to insert a Tab character.

→ No CommentsTags: · ·

Prune Your Time Machine Backups Selectively - Nice pointer to a new version of GrandPerspective that properly displays usage in a Time Machine backup disk (tags: macosx timemachine tips tools )
(0)




Tales from the Loonybin - Demystifying Mail.app Plugins – A Tutorial - Tutorial on how to write plugins for Mail.app on OSX. Maybe useful some day… (tags: cocoa howto macosx mail.app plugins programming tutorial )
(0)




CERIAS ranked as U.S. top information security program

May 6th, 2008 · No Comments   

I joined Purdue University in 1996, and joined the COAST laboratory (Computer Operations, Audit, and Security Technology) in the Computer Sciences department, under the direction of Gene Spafford. A couple of years later, COAST became CERIAS (Center for Education and Research in Information Assurance and Security). Under both names, it was a great place to learn, to study and to do research, full of interesting, engaging and fun people.

A few days ago, CERIAS was named as the top program in information security among U.S. universities.

Congratulations to everyone at CERIAS! It’s a well-deserved honor.

→ No CommentsTags: · ·

Twitter again

May 2nd, 2008 · No Comments   

I have been giving Twitter another good try lately, and I’m actually liking it. I think the trick is to collect a good group of entertaining/interesting/weird people to follow. It’s been fun so far, and I have actually reconnected with a couple of old acquaintances through Twitter. In any case, if anyone is interested, you can follow me on Twitter. I have installed Alex King’s Twitter Tools wordpress plugin, which should produce a new Tweet every time I post something here, and you should be able to see my latest tweets on the sidebar.

→ No CommentsTags: ·

Grepping plist files

April 28th, 2008 · No Comments   

I’m trying to track down why some of my attachments keep being downloaded to ~/Library/Mail Downloads/ even after I have set my Downloads directory in Mail.app to ~/Downloads/. I haven’t found it yet, but in the process I wrote a quick script for searching for a regular expression in .plist files, converting them to XML automatically if needed.

Here it is, use at your own risk (Download link)

#!/usr/bin/perl
# Usage: plistgrep regex file.plist [...]

use strict;

my $regex=qr($ARGV[0]);

shift @ARGV;

foreach my $i (@ARGV) {
  plistgrep($regex, $i);
}

sub plistgrep {
  my $r=shift;
  my $file=shift;
  my @text=plistread($file);
  print map { "$file: $_" } grep(/$r/, @text);
}

sub plistread {
  my $file=shift;
  my $type=`/usr/bin/file "$file"`;
  my @result;
  if ($type =~ /Apple binary property list/) {
    open F, "plutil -convert xml1 -o - '$file' |"
      or die "Error running plutil command: $!\n";
  }
  else {
    open F, "<$file"
      or die "Error opening file $file: $!\n";
  }
  @result=<F>;
  close F;
  return @result;
}

→ No CommentsTags: · · ·

Two Minute Playlists for Getting Things Done - Nice idea - for those 2-minue tasks, have a smart playlist in iTunes with songs that are around 2 minutes in length. (tags: gtd itunes productivity tips )
(0)




Hawk Wings - Plug-ins for Apple Mail - A good list of Mail.app plugins to explore (tags: apple mail.app osx plugins )
(0)




The awareness test - Very nicely done video to test your awareness to things going on around you. (tags: ad cool fun interesting video )
(0)