Coding problems and solutions.

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

The Code Library

Welcome to the code library section of the site. Here I hope to share some scripts and other various utilities I've created over the years to help solve some problems that I've encountered.

Unless otherwise specified, this code has only been tested to work on Mac OS X (10.3 to be precise).

Any use of the code supplied here is assumed to be at your own risk. I will make appropriate disclaimers, but try to use common sense. Feel free to modify the code as you see fit. All I ask is that you credit my code accordingly.

Enjoy.

MGJ

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