Shinji Kuwayama

Posts Tagged ‘mac

10 Mar, 2010

Perl one-liner to extract email addresses from a text file

Posted by: Shinji Kuwayama In: Rails| Tech Tips

I occasionally have to search log files for email addresses. Here’s the command I use to extract them all out quickly into another file.
perl -wne’while(/[\w\.\-]+@[\w\.\-]+\w+/g){print “$&\n”}’ original.txt | sort -u > extracted_emails.txt
There’s probably room for improvement here—any ideas, please comment!

01 Aug, 2008

Managing dashboard widgets on various external displays

Posted by: Shinji Kuwayama In: Tech Tips

I use a MacBook for daily work, along with an external monitor. When leaving the office, I take the Macbook and leave the monitor, naturally.
Dashboard widgets aren’t like ordinary windows — when I disconnect the external display, the Mac doesn’t automatically move them all to the primary display. They simply stay positioned way offscreen, and [...]

Tags:

About

View Shinji Kuwayama's profile on LinkedIn Shinji Kuwayama is a Rails developer in Chicago, Illinois.

Twitter

Posting tweet...