Perl scripts, snippets, and code samples

Perl / Applescript to check remaining Powerbook Juice

Here is a little perl / applescript I put together that monitors the status of my battery level. When the battery gets to a low enough threshold, an alert prompt is displayed so I know that it's time to start thinking about plugging the computer back in. This idea started after reading this hint.

You will see my comments if you scroll down (look for kb5ql).

To proceed, you will need to perform the following steps:

1. download and install the battery_check_alert script
2. change the permissions on the downloaded file

Perl script to check on Disk Usage

I wrote this script a while back to get a snapshot of my disk usage. Since I'm using a powerbook and hard drive space is limited, I thought it wise to make sure I didn't have too much garbage lying around my drive.

To use this script, simply download the disk_usage.pl file and place in a good location on your hard drive. Once you have downloaded the file, open up the Terminal application. Run the command:

chmod 755 /path/to/file/disk_usage.pl

Once you have set the execute permission, you can now run it.

perl /path/to/file/disk_usage.pl /your/dir/here/

Syndicate content

zaftig defined

zaftig |ˈzäftig; -tik| (also zoftig)
adjective informal
(of a woman) having a full, rounded figure; plump.
ORIGIN 1930s: Yiddish, from German saftig ‘juicy.’

Featured Gallery

Sites I Like