Skip navigation.

Harold's Home

   Home
  
XML version of this site

PHP Scripts

Index
CLI fun
Mail on 404
HB-NS (NewsScript)

Downloads

Applescripts
APOD to Desktop
Dreamweaver Extensions

Stuff

Writings
Other stuff
Central Grinder

OOOk Default:

VJ stuff
VJ Tools
Bananas
Strippers
Sample Movies

News

All articles in Mac OS X

Astronomy picture of the day script changed
The script to download and set your Mac OS X desktop to the astronomy picture of the day has changed a bit as the official site has moved to a new domain. A big thanks to user Kees for informing me of this.

Get the new script here: http://www.haroldbakker.com/personal/apod.php.

iCab 4
Hooray,

iCab 4 is out. Get it while it's fresh.

iCab 4 is based on Webkit so everything should render the same as it does in Safari. It can use the same cookies Safari has already stored (look in the Cookies section of the Preferences) and can import your bookmarks so your transition should be pretty smooth if you stick with it.

I've been using the beta versions for a while now and so far it has been delightful with all the good stuff to make you feel tingly inside: inbuilt ad-filtering, highly configurable, HTML/CSS error checking, automatic reloading of changed local pages (handy for web developers), bookmarks that are easy to categorise, rock solid browsing with no crashes.

What are you waiting for? Get iCab.

iCab 4
I'm not sure how secret this is although my guess is not very so I'll tell you all that iCab has a beta out for version 4 (only for paying customers for the time being) based on Webkit. My initial reactions are very favorable and so far the beta has been extremely stable and a pleasure to use.

As it's based on Webkit it uses the global cookie store (that is also used by Safari) and offers inline spellchecking (great for blogposts) and significant rendering improvements. It also has old favorites Safari misses such as a nice bookmarks system (separators, oh how I've missed you!) and the filter manager, allowing you to filter out ads/allowing cookies/sending referer info/turning on or off javascript/etc on a per-site basis.

I didn't like version 3 very much as it felt outdated on OS X, the interface was a bit odd compared to the "solid feel" (hard to describe otherwise) of Safari but version 4 offers the normal unified look other mac apps have, here's hoping the final release isn't too far off so everyone can share in the joy.

Free stuff
2 nice free things for your mac needs.
Get Div X Pro for free, nice if you want to encode a video file sometimes.
View syntax-highlighted source code in Quick Look, works with .h, .m, .js and .php files and probably a lot more.

Weird Terminal commands
Goodness but Unix contains some weird stuff.

[oook:~] harold% man leave
LEAVE(1) BSD General Commands Manual LEAVE(1)

NAME
leave -- remind you when you have to leave

SYNOPSIS
leave [[+]hhmm]

DESCRIPTION
leave waits until the specified time, then reminds you that you have to
leave.


[oook:~] harold% Time to leave!

/waves

Buggy 802.1X in Leopard
Goodness me but Leopard contains some nasty bugs. I spent much of the last few days watching Safari crash and today I spent an hour trying to get a teacher's Mac to log in to our 802.1X network. In the olden days connecting to 802.1X secured networks was relatively simple* using Internet Connect.app but Apple has removed that from leopard. Now you have to do all your configuring in the Network preferences and to say the airport section is buggy is an understatement. Deleted settings may re-appear at any time, selections, passwords and even user-names are often forgotten as soon as you OK a dialog, to top it all off the whole interface is confusing as hell. Even if you are able to find some miracle cure to get 802.1X working, the chances of rediscovering the steps needed are close to zero. The chances of these settings persisting through a restart also appear to be minimal.

I'm not the only one to have this problem of course as a rather large threat on Apple's discussion boards points out. Luckily, if you wade through that lengthy post, you'll find stories of people who had success with reinstalling Internet Connect.app from 10.4. Once you've done that all will be well and you can easily connect to your secured networks again. Probably. It worked for us and many other colleges but your mileage may vary.

What bugs me most though is the fact that this was apparently not tested at all. As evidenced by the huge number of educational institutions listed in the Apple thread many many colleges and campuses use 802.1X authentication. Not testing this is simply inexcusable and the person who redid the Network preferences pane should be escorted out of 1 Infinite Loop by security.
10.5.1 is rumored to be near release and offers some undisclosed fixes to 802.1X, I have to wonder how the heck they're going to clean up the interface such that it will be easy for us to give our students and faculty an easy 4 step process to set up their laptops, without having to send them to a market in order to purchase a goat, one, for the purpose of sacrifice, ritual.

[Update 14-11-2007:]
*) On rereading this I realize I should probably qualify this: setting up 802.1X usually takes about 2 minutes, which isn't horribly much if you compare this to the 10 minutes+ and installation of weird clients for Windows XP. Half a minute is usually wasted because the person I'm setting it up for types the wrong password the first time around, 80% of people do this. I have no clue why this is, but it's good for a laugh when I tell people beforehand they will likely make a mistake :-).


{Update 16-11-2007:]
OS X 10.5.1 has been released. One initial report suggests that 802.1X has not been fixed.

The blinking! It has stopped!
PithHelmet has been updated and is in beta. Huzzah! In my 10 minutes of testing I encountered zero ads so my old filters are still active.

Click the link at the top to the "working beta for Leopard".

Apache2 in Leopard
Apple changed the Apache installed in Leopard from 1.x to 2.x. This breaks stuff horribly as the config files are a bit different and you can't simply copy your old one over to the new /etc/apache2/ directory. I used bbedit to diff the two files and merge some stuff, but was still unable to get aliases outside the document root working. Then I came across a hint that suggests a simple fix:
You will find a Deny from all under <Directory /> (line 177 or alike). Change it to Allow from all.

This fixed the permission errors I was getting for stuff like phpMyAdmin and my iTunes folder which I can access remotely once again.
/cheer

Time Machine
Nice article explaining the way Time Machine in Mac OS X 10.5 (Leopard) backs up your data. Time Machine and full backups.
I bought a 500 Gig internal SATA drive last week at the corner computer shop for backup purposes. It cost me 109 euros. I can remember buying a 250 Gig drive for close to 400 a few years ago. Drives are cheap and big nowadays!
Pop quiz: given that the backup application is called Time Machine and Mac OS X allows you to name a harddrive, what is the name of my new backup disk?

John Siracusa of Ars Technica has some more technical bits about hard links for the nerds among you. OS X 10.5 Leopard: the Ars Technica review.

Update, the question has been answered in the comments.
The following icon set has an appropriate icon.

Goodbye cron
I got a new harddrive in my iBook a week or so ago and ever since then I've been without my scheduled cron jobs as I didn't have the time to set them up again.

In OS X 10.4 Apple replaced cron with launchd however. You can still use cron if you like (my desktop still runs all the jobs I set up years ago) but the preferred method of invoking periodic jobs is now the launchd daemon.


Migrating from cron turns out to be pretty easy, just create a plist, which is just an XML file, in the appropriate directory and launchd will do its thing.

See "Getting started with launchd" on the Apple Developer site.

Here's what the plist for my APOD to desktop script looks like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.haroldbakker.apod</string>
    <key>OnDemand</key>
    <false/>
    <key>Program</key>
    <string>/Users/harold/bin/apod.pl</string>
    <key>ProgramArguments</key>
    <array>
        <string>/Users/harold/bin/apod.pl</string>
    </array>
    <key>ServiceDescription</key>
    <string>Get the latest Astronomy Picture of the Day and set it as the desktop picture</string>
    <key>StartCalendarInterval</key>
    <dict>
        <key>Hour</key>
        <integer>10</integer>
        <key>Minute</key>
        <integer>30</integer>
    </dict>
</dict>
</plist>


This file is called com.haroldbakker.apod.plist and I placed it in the following location: /Users/harold/Library/LaunchAgents (create the LaunchAgents folder if it's not there).

No more messing around with difficult to understand crontabs, just drop a file into place and launchd will run it when needed.

Netinfo woes
I was going to write a glowing review of the new Google Analytics (GA) program as I've been given access to the statistics for the site of our World of Warcraft raiding coalition. Unfortunately GA can not be viewed on Safari so I dusted off Firefox and used that. GA has some really nifty features but unfortunately Firefox crashed on me. Hard.
So hard in fact that the Netinfo database became corrupted and I had no way to log into my laptop anymore. For the uninitiated, the Netinfo database stores the usernames and passwords for all accounts on an OS X system, including accounts that are used for obscure UNIX utility users you normally don't access.

So I had two options: wait until I got home and try to reset the password using the install cds or follow this hint and set up a new user.
I chose the latter so that I can continue working for today and sort out the rest later.

I'll do a review of GA later when I get some real work done.

Free idea for Apple
Sometimes computerusers do the weirdest things. Today I got a call from a secretary who was trying to insert a photo in a webpage. Despite several tries this simply wasn't working for her.

Turns out the photo was send to her as a .bmp file (shudder) and she knew she had to convert it into a jpeg for display in a webpage.
So she renamed the image in Windows Explorer, thinking that would fix it. It was at that point that she called me and I had to explain the difference between simply renaming a file and changing it's format through the use of some simple commands in an image editing application.

All turned out well but it got me to thinking about the issue. In reality what she tried to do wasn't that odd. If an operating system allows you to change the file extension why not go the whole way and actually convert the image to the new format. Of course this could lead to degradation and artifacts so it would be best if the system threw up a window warning the user of this and allowing them to preview the image.

I made a quick mockup of how this window could look. It would be preferable of course to give the user some additional options like zooming in on the image, controlling destination formats etc.



Dashboard
Over on the Virtual Pet Rock forums we have been asked whether there will come a version of VPR for Dashboard.

My reply is below:
Actually I was thinking about this too when I first saw Dashboard.

If we were to write VPR now it could well be as a dashboard widget, however VPR was written some time ago and is considered a "done" project. That means we are unlikely to add to the program or rewrite it for another platform (which Dashboard would be). I must also note that since receiving OS X 10.4 I have played around a bit with Dashboard and I simply don't like it. The whole mini-programs in a separate layer just rubs me the wrong way. Why would I want to switch to another layer to view the weather, calendar items and look up definitions in a dictionary if I already have my Safari, iCal and whatnot open? A controller for iTunes that exists in a separate layer, but for which I also have to open the regular program? Please, whoever thought of that is insane.

While I won't categorically deny the possibility of a Virtual Pet Rock widget it's extremely unlikely to happen, sorry.


In short: Dashboard makes a cool selling point, but ultimately it's not something that will make a huge difference to people's lives.
So far I like 10.4 (Tigger) but I'm still not convinced the upgrade was worth the price. Reviews state it is faster than 10.3 but I don't notice this, except in startup time which has decreased slightly. Spotlight might make a difference to me in the future, if it speeds up a bit, but it's too early to tell as my document folder pretty well organised.

New NetNewsWire News
Wow, the latest beta of NetNewsWire has been released and it's pretty cool. New is the integration with Bloglines, meaning you can now use multiple machines to keep up with your favorite feeds, yet not have to worry about seeing items you've already read. Seeing as Bloglines is free it's a good system if you use multiple machines.

For the record, here's what I did to switch to Bloglines feeds.
  1. Export all your current subscriptions (from the NNW File menu) to an OPML file.
  2. Create a Bloglines account online.
  3. Import your just created OPML file.
  4. Go to the Library/Application Support folder in your home directory.
  5. Create a backup of the NetNewsWire folder for safety.
  6. In NNW delete all your feeds.
  7. Go to File > New Special Subscriptions > Bloglines...
  8. Enter your account details and download the feeds list.
  9. Subscribe to all the feeds.


To celebrate here's also the latest version of the Bluish Stylesheet for NNW.
Here's what's new:
  • Added a border around <blockquote> elements
  • Removed generated quotes around <blockquote> elements
  • Added the content of the cite attribute after <blockquote> if present
  • Numerous small changes to enhance the readability of posts
  • Changed the titlebar so it scrolls with the post instead of always being at the top, enhances scrolling using the spacebar

Download Bluish.zip

To install simply double-click the zip-file to unzip it and then double-click the resulting Bluish.nnwstyle file. NNW will become active and ask if it should install the stylesheet. (Answer 'Install Style' to that.)

A curious thing
I am posting this using Safari. As much as I like Firefox when I use a PC at work, I cannot bring myself to use it on a Mac. It is slow to load and just doesn't feel like a Mac app. True, it does the same thing on Windows but on the Mac it's an irritation. (One can't expect a Windows application to "feel" like a Mac application after all...)

My favorite browser of all time is iCab of course, I've written about this previously. I stopped using iCab about a year ago because of it's incomplete implementation of CSS. As a webdeveloper it is my job to create sites that work in as many browsers as possible, but it is also my job to stay current. To do so means reading sites by leading webdevelopers. These sites are by their nature created using the latest webstandards. (And by latest I mean webstandards crafted in 1999.) If not they aren't leading webdevelopers, simple as that. If a browser cannot cope with that I stop using the browser. This is why Internet Explorer has never been my browser and probably never will, certainly not on Windows, where in some parts, Explorer is still behind the Mac version from 2000.

iCab 3.0 beta 222 was released to registered customers a week or two ago and I have used it since then but as far as I'm concerned it is a regression. True, the CSS implementation is pretty good, but the rest of the application just feels wrong. There's too much things unfinished. Things that worked fine in the old versions. Things like minimum fontsizes, providing direct links to CSS files and showing references for cite attributes in quotes etc. True, other browsers don't show these as well, but I've come to expect more of iCab.

So I've switched back to Safari. Much as it pains me.

Wooooo!
Say it with me!

Wooooooo!

After more than a year of waiting the new beta of iCab is out (for registered users only at the moment). For those unaware iCab is an alternative browser for the Mac. Perpetually in beta (or prerelease as they call it), probably because of lack of funding, it has lagged immensely in the last few years. Due mostly to the lack of support for modern standards like XHTML and (most importantly) CSS. In fact this lack of support was the main reason for me switching to Safari in Januari this year. I know there are some zealots that say a page should always display correctly in even the most ancient of browsers but, truth be told, as a webuser and -developer I just couldn't stand seeing pages fucked up beyond belief, despite them using ALL my beloved webstandards.

This release promises much, although it doesn't seem to support the text-shadow property of CSS2*. I have also already identified at least one possible privacy issue. When hovering over a link for which authentication is required, and this authentication is already in the keychain, iCab will add the authentication info in the statusbar. On the good side user-initiated pop-ups (I block other kinds) contain the domainname of the page that opened the pop-up. I'm sure there's lots more good stuff in there, so if you'll excuse I'm off to ogle some pages.

*) Though my good friend Jurjan told me he read of a hack somewhere to enable it. I'd love to see that!

Backing up
Pete of RasterWeb writes about the backup strategy he's employed. Fine stuff and something I've been doing for about a year and a half. (Cronnix is your friend in scheduling these kinds of scripts by the way.)

Here's an additional step I've taken lately.
It's a script that makes a rotating backup of three important directories in ~/Sites/www/ and archives them to ~/Documents/WebPages/Backup/auto-weekly/.
This script will archive certain directories and keep them available for a few weeks. This means that if I change something today and realise a week or two hence that this was a Really Really Bad Idea™ I still have the option to go back. It's a kind of version control without all the really technical stuff (believe me: real version control is much more involved).

Archives are named somewhat cryptically (with files named bla.0.gz, bla.1.gz etc.) but as the Finder can sort on date this is no big deal.

#!/bin/sh

cd /Users/harold/Sites/www;
tar cf /Users/harold/Documents/WebPages/Backup/auto-weekly/haroldbakker.tar haroldbakker.com;
tar cf /Users/harold/Documents/WebPages/Backup/auto-weekly/virtualpetrock.tar virtualpetrock.nl;
tar cf /Users/harold/Documents/WebPages/Backup/auto-weekly/blogscript.tar blogscript;

cd /Users/harold/Documents/WebPages/Backup/auto-weekly;

for i in haroldbakker.tar virtualpetrock.tar blogscript.tar; do
   if [ -f "${i}" ]; then
      if [ -x /usr/bin/gzip ]; then gzext=".gz"; else gzext=""; fi
      if [ -f "${i}.3${gzext}" ]; then mv -f "${i}.3${gzext}" "${i}.4${gzext}"; fi
      if [ -f "${i}.2${gzext}" ]; then mv -f "${i}.2${gzext}" "${i}.3${gzext}"; fi
      if [ -f "${i}.1${gzext}" ]; then mv -f "${i}.1${gzext}" "${i}.2${gzext}"; fi
      if [ -f "${i}.0${gzext}" ]; then mv -f "${i}.0${gzext}" "${i}.1${gzext}"; fi
      if [ -f "${i}" ]; then mv -f "${i}" "${i}.0" && if [ -x /usr/bin/gzip ]; then gzip -9 "${i}.0"; fi; fi
   fi
done


If this script seems somehow familiar you've probably been looking at the periodic scripts included in Mac OS X, as they're a blatant rip-off.

In essence what this script does is create a backup of certain directories and archives them for a few weeks. This makes it easy to go back a week or four. For extra brownie points you will implement this yourself and backup to an external drive AND create monthly rotating backups too. (It doesn't have to use the same script.)

If you want to implement something like this I'd recommend doing a search for 'Mac OS X cron script tutorial' or something like that to find out more. If that doesn't help or confuses you (quite possible :-) ) just e-mail me and I'll do my best to help you out (or update this entry).

Just to point out the obvious though: the names 'harold', 'haroldbakker.com', 'virtualpetrock.nl', 'WebPages', 'auto-weekly' etc. are unlikely to be right for your system. A little thought on your part would be cool.

Watching for Opener
What with all the hooha about the supposed Opener worm infecting Macs I decided to look into a new feature in NetNewsWire 2 (currently in beta): scriptSubscriptions. Basically this lets you subscribe to the output of a shell script or AppleScript that does something like watch a folder for new items or monitors a file and munges that into an RSS feed.

Turns out that Brent has already created a demonstration script that only needed a few lines changed to monitor for new items in the /System/Library/Startup Items folder.
Download Startup Items FolderWatcher.

Installation is easy: expand the zip file and store the AppleScript somewhere, then follow the instructions as given on the NetNewsWire scriptSubscriptions page:
... in NetNewsWire, choose File > New Special Subscription > Script...
NetNewsWire will prompt you to locate your script. Choose it.
NetNewsWire adds the script subscription and also opens the Info window. Make sure the Script Settings section is open in the info window and set the type of the script.
NetNewsWire then runs the script and displays the result.

Bluish 1.0.1. released
I have released version 1.0.1 of my stylesheet for NetNewsWire 2.

New in this version:

- Changed <blockquote> so it's contents are no longer italic.
- Added styles for <i>, <em>, <b> and <strong> so they properly inherit the font color when for example inside a <blockquote> element.
- Added overflow: auto to <pre> tags so a scrollbar is provided instead of text running on and on and on with really long lines
- Added CSS styles for classes given by "Convert Script to Markup code" http://homepage.mac.com/jonn8/as/ to AppleScript code
- Modified .newsItemDescription:first-letter so the first letter in a post now stands out more
- preformatted text (<code> and the like) is now also in blue


Download the zipfile.

Bluish 101
A big welcome to the hordes of ranchero.com visitors. This is to let you know that I'm busy updating the Bluish stylesheet based on some feedback, a new version should be out by the end of the week.

What have you got to look forward to?
- Changed blockquote so it's contents are no longer italic.
- Added styles for i, em, b and strong so they properly inherit the font color when for example inside a blockquote element.
- Added overflow: auto to pre tags so a scrollbar is provided instead of text running on and on with really long lines
- Modified .newsItemDescription:first-letter so the first letter in a post now stands out more


Hang in there, it's a work in progress and getting better all the time.

Bluish
For the last year or so I've been a big fan of RSS. Ever since I first discovered the joy of NetNewsWire (freeware Lite version available) the program has transformed the way I use the web. Instead of manually checking about 15 sites a day (some multiple times) to see whether there's anything new to read I now check about 70 sites a day.

One of the nicest things about NNW is not its ease of use (else I wouldn't use it) or the ability to keep up to date (all aggregators do that) but it's interface. It is clean and well thought out. It has also long been possible to create a custom stylesheet to view newsitems, but the new version has really made this a lot more powerful.

With the coming of the NNW2 betas I've finally created a really comprehensive stylesheet. It's called Bluish as it's, well, blueish.


click for close-up


It's fairly complete and works in all three view modes (but works best in Traditional View). It includes styles for (block)quotes, code, abbreviations and the like.
You can download the zip-file here. Just unzip and put the Bluish folder in ~/Library/Application Support/NetNewsWire/StyleSheets. Then select the stylesheet in the HTML Preferences.

This may also be a good time to point you to the new and improved RSS feed of this site: http://www.haroldbakker.com/rss.xml as that feed contains some nifty new features seen in the screenshot above. Best feature is that entries now get a real date instead of the date the feed was fetched. As it's a static file this also means less bandwidth is wasted. (For those using the old feed: it won't go away anytime soon so don't worry.)
Enjoy.

Text Factory
My new copy of BBEdit 8 has already payed for itself.
Text Factory is brilliant.

SQLite in OS X 10.4
Tiger to get SQLite support.
SQLite is optimized to provide fast access to database records and is designed for general-purpose use. One example is Core Data--a new Apple framework that simplifies application creation based on a Model-View-Controller architecture--that uses SQLite extensively to provide backend storage for user-defined data.

This is pretty exciting stuff. Currently a lot of developers are either abusing the Preferences system to store data or using the Application Support Files directory to store loads and loads of little files containing configurable items.

Virtual Pet Rock for example uses it's preferences to store information about a rock's statistics in the preferences file, which is clearly wrong for several reasons: the preferences system works well for small amounts of data but preferences are prone to corruption and can be suddenly wiped completely if the hard-disk runs full. (This is the reason I decided to store more information on uploads in our user-database some four months after the initial release: so I can restore a rock if the preferences are wiped.)
The method of storing loads of little files in Application Support is employed by for example BBEdit. This makes migrating or synchronising to another machine very tedious as there can be thousands of files. (My PHP glossary, for example, contains 2,770 items.)

Another area where I can see improvement is in the handling of browser bookmarks and history/cache information. If these could be inserted into a database you would instantly get the ability to run SQL queries against them, which makes me salivate. Or think of the potential for the iTunes XML file! Currently I have a 12 megabyte XML file which is hard to parse or do anything with. See for example an earlier article.

The possibilities are endless.

Permission denied!
A few days ago I wrote about the viability of Linux on the Desktop. To paraphrase myself a bit I wrote that in my opinion there was no distribution yet which even approached the usability of Mac OS X.

This is of course natural behaviour for a Mac-user. We are all apologists, and stupid to boot, according to a lot of Windows and Linux apologists.

This is, of course, true. As far as it goes. And it's not very far at all (although I balk at the description of Mac users as being stupid). Take the following post from Mezzoblue: Reboot.
Dave Shea, he of Zen Garden Fame, wrestles with permissions on OS X. This is a valid point and one I have personally encountered a couple of times with designer friends who are not into UNIX at all, and use a Mac to be free of the complexities of computing.
These people use a Mac because it gets things done quickly and efficiently. I would go further and say they are not into computers at all. They use computers because they are tools that get things done. They don't use computers because they are cool. If a computer can play a game they like, so much the better, but it's not a deal-breaker. If a computer can't run Adobe Illustrator that is a deal-breaker. (Remember, these are designers, these people live in Illustrator, Photoshop is for amateurs.) If an operating system gets in the way of organising, finding and using files it is a problem. A huge problem. This is why they use a Mac. These are people that need to get a job done.

I have a clipping on my desktop that says the following: Good, cheap, fast. Pick two. All too often a client chooses cheap and fast, expressing the wish to also get the good part. Getting all three is an illusion.

Designers don't care about sudo chown my_account:staff /Users/Shared/Pictures or sudo chmod 644 /Users/my_account/Documents/FileMaker\ Files/*.fp7. They care about an Operating System that doesn't stand in the way. And yes, sometimes Mac OS X does get in the way. I am tired of explaining to non-geeks what chown and chmod mean. I don't want to bother them with it and they don't really want to know. Apple needs to provide a repair permissions facility that not only repairs permissions for applications but also for documents that are owner-less or belong to users that have been deleted. Overall the system does a good job, but it can, and should, get better.

The addition of a UNIX background with a command-line and its internet services has done a tremendous amount for the geeky Mac users like me. But now that more and more designers are taking the step to switch to OS X it is time for Apple to recognise that most of these people aren't geeks.

They don't want to be and they don't need to be.

Stuff that just works(TM)
We from Virtual Pet Rock regularly get requests to port the program to Windows. We seldom get a request for a Linux version. But today we got one, complete with bad spelling and a whiney tone. I thought part of my reply would be of interest to the readers of this site too as it touches on an essential point about Mac OS X, it's ease of use compared to the ease of use of current Linux distributions. Even if you're using Windows (and I know a lot of my readers are) the points are quite valid.

Original post:
1. macs suck osX is good becuse maintosh didn't realy write it they stole it from freebsd

My reply:
Allow me to retort.

1a. Macs are quite good hardware wise. You simply pay a premium for high-quality materials that Apple has verified thoroughly work well together. This might mean less options on low end stuff like crappy video-cards and dodgy CD-Rewriters but if you're into cheap hardware you shouldn't be looking at a Mac anyway.

1b. Mac OS X was not stolen from FreeBSD. The BSD license specifically states that the kernel and component parts can be modified and redistributed.
True, it's not as viral as the GNU license and therefore probably not of interest to the Windows-using Slashdot whiners who only like GNU because it sounds like an animal, not because they actually know how to program a single line of code. Apple has simply done what no Linux distributor has ever done: write an intuitive, easy on the eyes window manager, with hardware acceleration to boot and loads of features that make it easy to work with. As an added bonus the system will work out of the box with nearly every third party digital lifestyle component (digital (video)camera's, printers, bluetooth phones, MP3 players etc.)
The fact that Apple makes the hardware and the system software (thereby supplying the whole package) simply means that hardware and system work together seamlessly.

True, the marriage between open source utilities and a proprietary system might feel strained to someone who doesn't like to pay for anything if there's a free alternative but that's your choice.
Me: I like to just have a machine that works. I don't have the time to compile kernels and configure obscure drivers every three months. And I'm a self-confessed geek. What's more: neither my parents nor a lot of my friends would ever consider compiling even the simplest utility from source, no matter how free it is.

Why do you think stuff like apt-get, ports and rpm were invented and are so popular? it's because a lot of this stuff is way above the heads (and time-investment) of most people.
This is not a bad thing in my opinion, it just shows that there is a market for an easier *nix based machine, one in which even stuff like apt-get looks insanely complicated and out of the dark ages. Apple is filling that niche.


I believe I wrote in January of this year that I didn't think this would be the year for a desktop Linux to break through. From what I've seen so far of the enhancements to KDE and Gnome this still holds. The systems may rapidly become more usable but there's a long way to go until 'Aunt Tilly' can use these systems comfortably. Heck, even Windows is more usable than a lot of this stuff.

Don't get me wrong: I like Linux. Debian is my preferred OS for web-serving because of it's stability and performance, but I'd never use it as a desktop environment. Hell, I wouldn't even want to maintain a Debian system.

Repeat !!
It happens quite often that while I'm in the Terminal I issue a command for which I don't have enough privileges.
For instance: sudo ipfw list will list all the currently active rules for the firewall. If you happen to forget the sudo part however, all you will see is a warning: ipfw: socket: Operation not permitted.
You'll have to reenter the command again with the sudo part before it.

I knew there was a special command in tcsh that would repeat the previous command however what it was eluded me. Today I got tired of that and actually did some digging and come up with the following: Survival guide to the Unix shell tcsh.

It states that !! repeats the previous command, so if you type sudo !! after a failed attempt you will save yourself some time.

The guide contains some more useful tips but if all you pick up is this one rejoice!!

USB Floppy RAID
Ah, the power of X!

USB Floppy Disk RAID, via b3ta.

Connected
Wooohooo!

I've just installed an airportcard in my PowerMac G4 (QuickSilver 2002) and an airport extreme card in my iBook G4.
The PowerMac is sharing it's internet connection via the airportcard in the study and I'm sitting here on the couch without any wires at all posting this.
signal strength: 4
The installation process was fairly easy once I figured out that to insert the card in the iBook required a little force (it has to "click" so the metal braces holding it in place actually fit).

The PowerMac was also a bit of a puzzle. Turned out that while the airport extreme card in the iBook was to be inserted with the words airport extreme visible, the PowerMac's card was to be inserted upside-down so the word airport wasn't visible.
signal strength: 4
Once I figured out those things everything went smoothly and actually creating an ad-hock network and joining it was the matter of less than a minute.

Joy of joys, now I can aspire to become a real couch-potato.

Logged again
A while ago I wrote the article Logged!.

Since then I've found the following url which will test your mailsystem for anonymous relay access.
http://www.abuse.net/relay.html.

If you're running a mailserver you might want to check this out, beware that the tests take some time.

Logged!
Hot damn!
Three posts in one day. What next? Pictures of my new kitten? (Note to self: stop being allergic to cats and get one.)

Hotbox.ru email service offers a great number of highly reliable servers. Though, we do not stay at one place, we are constantly developing in order to increase the number and improve the quality of offered services. From mail15.com.


Yup:
Mar 2 00:14:15 oook postfix/smtpd[14752]: connect from ol66-68.fibertel.com.ar[24.232.68.66]
Mar 2 00:14:19 oook postfix/smtpd[14752]: 2F895E97D0: client=ol66-68.fibertel.com.ar[24.232.68.66]
Mar 2 00:14:19 oook postfix/smtpd[14752]: 2F895E97D0: reject: RCPT from ol66-68.fibertel.com.ar[24.232.68.66]: 554 <impresha@mail15.com>: Relay access denied; from=<dameunip3@mail15.com> to=<impresha@mail15.com> proto=SMTP helo=<none>
Mar 2 00:14:20 oook postfix/smtpd[14752]: disconnect from ol66-68.fibertel.com.ar[24.232.68.66]
.

[Edit: for some reason this was posted in the Movies category, fixed!]

The Answer to Life, the Universe and Everything
Answer Calculator IconA friend mailed me the following url: http://carbon.cudenver.edu/~mstilman/zaphod/prog.html.

I wrote a Cocoa program for Mac OS X that calculates the Answer to Life, the Universe and Everything. It even includes a progress indicator. Wooooo!!!

Here's a screenhot of the interface:
Answer Calculator screenshot.

Download Answer Calculator for Mac OS X (28k).
Download Answer Calculator Source Code (36k).

Enjoy!

The Horror
Important Information About the AppleWorks 6.2.9 Updater

<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta name=Title content="Important Information About the AppleWorks 6">
<meta name=Keywords content="">
<meta http-equiv=Content-Type content="text/html; charset=macintosh">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="AppleWorks%20Read%20Me%20First_files/filelist.xml">
<title>Important Information About the AppleWorks 6</title>


Am I the only one who finds this disturbing?

Logging FTP access
I was playing around with the FTP server in Mac OS X and came across a method to allow the built-in server to log a bit more information. I decided it might be fun to write up a small tutorial on how to do this and focus on complete unix newbies.

The tutorial can be found at the following location: Logging FTP access.

Enjoy and feel free to point out omissions, inaccuracies or post any questions you have using this newsitem's comment system.

Taking things back
Now that Mac OS X 10.3 has blatanty ripped off Windows' Alt Tab behaviour to switch between currently running applications it's only logical the Windows community takes something back.

Enter Win Exposé.

Command Line Happyness
If it's new to me, it might be new to you.

If you're in the commandline (on OS X and probably any UNIXy OS) and the line is long (as they sometimes get) and you want to quickly jump to the beginning of the command type control+a. To jump to the end type control+e. (Yes Virginia, this works on commands that span multiple lines.)

Oh frabjoy day!
Try it out with a long cd command and say it with me:
Calooh! Callay!

Virtual Pet Rock 1.1 released
I am proud to announce the release of Virtual Pet Rock 1.1 for Mac OS X.

You can read more about the new features in the versionhistory:
http://www.virtualpetrock.nl/versionhistory.php
or proceed straight to the downloadpage:
http://www.virtualpetrock.nl/download.php.

Joy!

Opinions on XCode
Nat takes issue with the new XCode icon in a big way.
I have to say I agree. I'm also not sure If I like XCode itself, ProjectBuilder was lots easier to "get" methinks, but time will tell.

Nat!'s Web Journal

OK, everyone loves quotes. Here's one about the various incarnations of ProjectBuilder/XCode icons:
What always has been peculiar about this icon was the hammer, as in general coders do not use that as an input device.

Update: Nat has pulled the article as he felt is was not a good way to begin a series, I've left the quote above but clarified it somewhat because the original article is no longer there for reference.

Twiddle like it's going out of style
My good friend Jurjan has released TwiddleService. A service-menu item that lets you Twiddle letters, so you can easily switch two letters if you've typed them in the wrong order.

As always: you'll need a Mac to get this to work so crack open the piggybank.
http://www.xs4all.nl/~jurjan0/TwiddleService.html.

List all abbreviation tags in an entire site
Last week I received an e-mail from someone who wanted to extract all <abbr> and <acronym> tags from a website. He wanted to put all these into a kind of glossary. Ideally he would want this tool to work from within Dreamweaver.

I thought this kind of a problem was more suited to Perl so I went ahead and wrote a script. The script works fine on my OS X machine and I see no reason why it wouldn't work on any other *nix system.

There's a couple of things to know before using this script:
1. You will have to point the script to your website directory (line 29).
2. There should be no files called "list.txt", "abbr-list.txt" and/or "abbreviations.txt" in the siteroot. These will be overwritten!!!
3. Final output is to the file "abbreviations.txt", it will list all <abbr> and <acronym> tags, which you can then paste into a regular HTML file.
4. The default for this script is to extract all tags from html files, you can change the extension to search for (in line 36).
5. There's a secondary perlscript used that removes duplicates and sorts the output. This file came with BBEdit and is called kill_dups_and_sort.pl. It is included in the download.

Download the script.
See the output.
Enjoy!

APOD to Desktop
I just received a bit of feedback on my APOD to Desktop script for OS X. I thought it might be interesting for all OS X users interested in the script so to prevent myself from typing it all up again I'll just paste the e-mail and edit a few words here and there.

-- begin --
> your apod to desktop script is cool. However, when I log out and then log back
> in the desktop picture is gone. What do I need to do at login to get the
> picture on the desktop?

Hi,

If I log out and back in again the picture is still there. I assume you mean restart. The downloaded pictures are stored in the (otherwise invisible) folder /tmp/. If you open up the Terminal and enter the following commands:
cd /tmp/; open ./;
you will open up this folder in a finder window. You can then see what's stored there. After a restart this folder will likely be empty.

This is due to the following reason:
The Unix underpinnings of Mac OS X store temporary files in that location. As Unix systems are rarely shut down this folder could become stuffed with old files were it not for the fact that Unix runs some maintenance scripts once in a while to trim the folder. After a restart this folder is also emptied. I have decided to put the downloaded pictures in /tmp/ as this will limit the amount of disk-space used and prevent the disk from filling up unnoticed (OS X does weird things when your hard-disk is full, trust me).

So there's a problem: if you shut down your machine the picture of the day is lost.
I have thought long and hard about it but the best way to circumvent this behaviour is creating a small applescript application that runs as a login item. Drop it into your utilities folder and add it to your login items.

I have updated the APOD to Desktop page on my site and added the script to the regular distribution, the source for the applescript is included if you want to take a look before installing it.
-- end --

By utilizing the do shell script command in a small applescript application I've effectively removed one of the biggest problems with the current scripts, namely the fact that most macs aren't running 24/7. Also, running the script as a login item (via a small applescript wrapper) means that there's really no need anymore to set up a CRON job.

Of course if your machine is on 24/7 you'll still want to do that.
So head on over to the APOD to Desktop page and get downloading.

[Update 29-09-2003:
Mark Brethen has provided a much more elegant applescript to set the picture at login. Both the applet and the source are included in the new download.]

PerversionTracker reviews Virtual Pet Rock
Wooohooo,

what I had feared since last december has finally happened. PerversionTracker has reviewed Virtual Pet Rock.

http://perversiontracker.com/archives/000259.html.

PerversionTracker (PvT) is a spoof on VersionTracker and keeps an eye out for apparantly useless software. To be featured on PvT your software must be useless (or pretty darn near it). Scoring is on a scale of 1 to 11, where 11 is the worst. 'Bonus' points can be gotten for stuff like coding in RealBasic, using an inappropriate metal interface, baffling dialogs, ugly icons, not following Apple's Human Interface Guidelines and using bad spelling.

Virtual Pet Rock received a 5.5, which is lower than I would have expected, but then we don't use a metallic interface or RealBasic.

The review is pretty funny so check it out.

PHP CLI update
I have updated the page about running a PHP command line urlen/-decoder to reflect the fact that the latest install from Marc Liyanage now includes the command line version of PHP.

If you decide to upgrade please be aware that the commandline tool has moved from /usr/local/bin/php to /usr/local/php/bin/php.

You will have to manually remove the old versions of php and pear:
cd /usr/local/bin
sudo rm php pear

For those who don't know, pear is kind of like perl's CPAN module to ease the installation of third party modules.

ipconfig ???
This is a public service announcement:
If ever your local hell desk people come to you, the owner of the only Mac on the entire network and ask you to fiddle around with ipconfig from the commandline to get a new IP adress (because the DHCP server has assigned you the IP adress of a printer) just smile, back away gently and open System Preferences > Network. Change the pop-up at Configure from "Using DHCP" to another item and switch back to receive a new IP adress.

Sometimes things are simple.

Helpfiles
I'm sorry I haven't written much on the site lately but I've been busy doing some support for Virtual Pet Rock and the newsscript.

I've also decided to tackle the HTML helpfiles for the upcoming release of Virtual Pet Rock, updating them for new features, trying to rationalise them by cleaning up the code etc. Boy will I be pissed if Panther doesn't update Apple's crappy HTML 3.2 based helpviewer to take full advantage of all WebKit has to offer.

[update]
I did some digging and the following appeared in the Apple-Help-Authoring mailing list: Apple Help will be enhanced to take full advantage of the Safari HTML rendering engine, and will provide support for HTML 4.0, CSS, and JavaScript.
This is not an announcement from Apple but it certainly looks plausible.
[/update]

Label like it's 1999
Just a quick note to let everyone know that labels are back.

http://www.apple.com/macosx/panther/finder.html

I'm a happy camper.

Linkchecking in OS X
There has been some discussion lately on a mailinglist I'm on about linkcheckers. Now when I'm on a windows machine I use Xenu which is blistering fast: http://home.snafu.de/tilman/xenulink.html

Unfortunately it doesn't run on Macs. There are however some freeware tools available for *nix systems and I tried a few of them. Unfortunately the install process of most *nix software leaves a lot to be desired. I did some further digging and found the following:
http://degraaff.org/checkbot

It uses Perl (installed by default on OSX) and some perl modules which you might need to install (libwww, URI, HTML::Parser, MIME::Base64, Digest::MD5, and libnet):
http://www.linpro.no/lwp
In addition to the listed modules I found I also needed to install HTML::Tagset, available here: http://search.cpan.org/author/SBURKE/HTML-Tagset-3.03/.

To install a perlmodule simply download the targzip, uncompress (a recent version of stuffit expander will do) and (using the terminal):
cd path_to_directory_that_was_just_created
perl Makefile.PL
make
make test
sudo make install


After you've done this for all modules (it will take about ten minutes of your time) use the commandline to run checkbot like so:
checkbot --url http://www.yourdomain.com --verbose. It also has the option to mail the results, using another module, I will leave the installation and getting it up to the reader, though you may mail me if you need a hint ;-)

iTunes 4.01 changes sharing feature
Hot on the heels of my previous article Determine iTunes share status with PHP: 25-05-2003
Apple has released iTunes 4.01 which disables iTunes sharing with the entire world.
Rather than reiterate what others have said let me point you to this overview:

It was fun while it lasted but this is probly inevitable. apple updates itunes, web explodes.php.

Determine iTunes share status with PHP
You can easily determine whether an iTunes share is running using a small PHP script. Include this in your PHP enabled website, changing the ip where appropriate.
$fp = @fsockopen ("your.ip.here", 3689, $errno, $errstr, 1);
if (!$fp)
{
echo "iTunes not running.<br>\n";
}
else
{
fclose ($fp);
echo "<a href=\"daap://your.ip.here:3689\">Connect to iTunes share.</a><br>\n";
}

Astronomy Picture of the Day
Today's Astronomy picture
I have finished the scripts that will download the astronomy picture of the day and set it as the current desktop backgrond in Mac OS X. The scripts use Perl and OSAscript (the commandline version of applescript). Enjoy.

Random Ramblings
UNIX is cool.

Here's a few of the lines I currently have in ~/Library/init/tcsh:
alias bbhttpd "bbedit /etc/httpd/httpd.conf"
alias restartapache "sudo apachectl stop; sudo apachectl start;"

Which makes it extremely easy to edit Apache config files in BBEdit and then restart Apache to see how bad you've fucked up, if at all.
Having your own server at home definitely rocks, especially if your boss pays part of it through some kind of PC at home project while at work you're forced to fiddle with the dark arts and Windows NT while on the job.

So I've decided to get me one of them thar iPods. I figure there's gold in there somewhere. Or at least some pretty good stuff. One of the most important things a digital device has got to do for me is keep track of what books, dvd's and cd's I've already bought so I don't buy them again, and the new notes reader seems to fit the bill, all it needs is an automated export from Filemaker and I'm good to go. This may sound silly but in the past few months it's happened to me a couple of times that I've come home all a-joy, only to find I've bought something I've already got, thus deflating my joy like a balloon on which a sharp-clawed rabbit has sat (a private thought, sorry about that).
Now with books this is normally not a problem, most of my friends are into the same kind of sci-fi I am. Likewise with movies, but in the music department I stand alone. I'm still clinging to the idea that Grindcore will once be the next big thing to hit the market.
Alas, as some random googling points out Grindcore is as dead as a dodo. All you find is some crappy tracks of bands better left unknown. The hey-day of such giants as Carcass and O.L.D. has gone. Earache records seems to be slowly festering away. "Grindcore was invented here..." their <title> tag proclaims. Yeah sure, invented here... but where is your god now?

I'm looking for some kind of daemon that will silently and unnoticably post the iTunes tracks I'm currently listening to to this website, by the way. Something small and background-y. I don't need no stinking dock items anymore. Something like Recent Tunes would fit me nicely except I'm not really in the mood to hack that code right now.
You see, I'm working on some code right now to download the latest astronomy picture of the day and set it to the current desktop picture, using Perl and OSAscript (if you don't know what this means you're probably my mum, in which case: Hi mum! or on some windows thingy or other: yeah sure hi to you too). The code is a bit buggy right now but I'll see how it goes and post it a few days after it seems stable. (Don't you just hate 0.1 releases?)

That's all for now (currently listening to Carcass - Reek of Putrefaction - Excoriating Abdominal Emanation by the way).

Cool Useless Software
Found this great review of completely useless software on PerversionTracker.com: PT Bruiser.
It's a browser with a twist, it will only allow you to visit perversiontracker.com, although there is a hidden feature that enables you to visit other websites. I spent a good half an hour before I was able to visit my own homepage screenshot.

If you're running MacOSX give it a whirl, and have fun.
Hint: click the "sponsored by l33t.com" ad and be aware that you can only get to other sites by clicking on links. Try to find one to Google and you're home free.

Show all items | Read all items | Show topics

About, copyright, privacy and accessibility | Mail