- Define a shortcut for Power Search. System Preferences > Keyboard & Mouse > Shortcuts > iTunes > Search… I set mine to Cmd -F (odd that that doesn't focus on the search field, by default)
- Wishlists. Just create a playlist and drag stuff from the store to it. Only works with individual tracks, sadly
- Don't forget to de-authorize computer before formatting the HD. It's OK if you restore from a complete backup (including the stuff under /Volumes).
- Use the Browse command (Cmd-B)
The action produces a chart right off the bat, but the input is weird:
Input: (Anything) Two dimensional array of chart labels and data.
What is that? After trying every possible permutation of what I thought an AS 2D array would look like (some of which even compiled!) with different kinds of input sources (AS, text) I finally gave up the Automator Action option.
Using script editor seemed promising at first, but a simple add chart with all the properties produced nothing. Finally managed to find this really nice example, but it only worked with Pages. Digging in the action's bundle revealed that you're supposed to tell the slide to add the chart. OK, time to put this new-found knowledge to work:
tell application "Keynote"
set theData to {{1, 2, 3}, {4, 5, 6}}
set theSlide to (slide 1) of first slideshow
tell theSlide
add chart row names {"Dec", "Jan"} column names {"Machines", "Visits", "Hits"} ¬
data theData type "vertical_bar_3d" group by "column"
end tell
end tell
Tadaa! Sweet. Now all that remains is to add the
webalizer parsing code...
# servermgrd -d
2007-01-28 23:39:04.717 servermgrd[20540] *** _NSAutoreleaseNoPool(): Object 0x306030 of class NSCFData autoreleased with no pool in place - just leaking
2007-01-28 23:39:04.717 servermgrd[20540] *** _NSAutoreleaseNoPool(): Object 0x306420 of class NSCFData autoreleased with no pool in place - just leaking
2007-01-28 23:39:04.733 servermgrd[20540] Entering initialize
2007-01-28 23:39:05.600 servermgrd[20540] Starting idle processing
Bus error
Well, it turns out that the stuff about memory leaking is "normal". Here's the output of the same command on a totally unrelated, perfectly in-order Tiger server:
# servermgrd -d
2007-01-28 23:52:46.348 servermgrd[21665] *** _NSAutoreleaseNoPool(): Object 0x306020 of class NSCFData autoreleased with no pool in place - just leaking
2007-01-28 23:52:46.348 servermgrd[21665] *** _NSAutoreleaseNoPool(): Object 0x306410 of class NSCFData autoreleased with no pool in place - just leaking
2007-01-28 23:52:46.349 servermgrd[21665] Entering initialize
It's the Bus error that I'm worried about. Most of ktrace servermgrd -d and kdump -f ktrace.out is incomprehensible and so is pretty much /Library/Logs/CrashReporter/servermgrd.crash.log
Checking the last lines of kdump (kdump -f ktrace.out | tail -n 20) did mention /Library/Keychains/System.keychain, just shortly before the crash. A find -ctime 2 confirms that System.keychain was modified just around that fateful moment when this problem started. For the heck of it, I decided to move the old keychain aside, and create a new one:
# mv System.keychain System.keychain.old
# security create-keychain /Library/Keychains/System.keychain
Sure enough, servermgrd was open for business again:
server:/Library/Keychains root# servermgrd -d
2007-01-29 00:20:48.654 servermgrd[20712] *** _NSAutoreleaseNoPool(): Object 0x306030 of class NSCFData autoreleased with no pool in place - just leaking
2007-01-29 00:20:48.655 servermgrd[20712] *** _NSAutoreleaseNoPool(): Object 0x306420 of class NSCFData autoreleased with no pool in place - just leaking
2007-01-29 00:20:48.655 servermgrd[20712] Entering initialize
2007-01-29 00:20:48.946 servermgrd[20712] Starting idle processing
2007-01-29 00:20:51.534 servermgrd[20712] Done with idle processing
I was actually able to salvage the certs and private keys from the damaged keychain file like thus:
# security export -k /Library/Keychains/System.keychain.old -t all -o ./all.pem
and then import them back into the fresh keychain:
# security import ./all.pem -P -k /Library/Keychains/System.keychain
2 keys imported.
3 certificates imported.
The bad news is that although Server Admin works again, I'm unable to use the Certificate Manager. Any attempt to either add or import a cert gets replied by a dull "The selected certificate could not be retrieved. Going back to the list." Oh well, just another good reason to get more comfortable with the CLI - it's not as fragile... By the way, If you change SSL certs in httpd conf files, it seems it's better to stop and start the server, not restart (otherwise the old cert is still used).
Just for the record, the cert and key in /etc/servermgrd are disposable. If you delete them, they will be re-created by servermgrd on the next launch. Oh, and there's also certadmin, but it did absolutely nothing for me.
If the Mac was so great, why did it lose? Cost, again. Microsoft concentrated on the software business and unleashed a swarm of cheap component suppliers on Apple hardware. It did not help, either that suits took over during a critical period. (And it hasn't lost yet. If Apple were to grow the iPod into a cell phone with a web browser, Microsoft would be in big trouble.)
Excerpt taken from Paul Graham's excellent Hackers & Painters, published in 2004.
> export LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386"
> export CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Sometimes this lead to:
gcc: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
in which case passing --disable-dependency-tracking to configure seemed to help.
One thing I think could work better is the Taste-o-meter. It seems it's also the basis of the Neighbours feature. It could be a little smarter - instead of just counting the artists two users have in common, it could compare the relative "rareness" of that particular artist. Everyone listens to Foo Fighters or Tool or DJ Shadow or whatnot but that doesn't mean they actually have anything else in common. This creates the anomaly where someone with 40 000 played tracks is suddenly neighbours with everyone. Now if two people both listen to an obscure Finnish accordion-jazz ensemble, the chances are, they have a lot more in common as well and that they should definitely check out what other tracks they've played.
I thought this idea was pretty cool so I sent it in to last.fm but they never even acknowledged it, so I thought I'd stick it up here instead of just having it vanish into the ether.
In other news, watch out for failed user-specific crontab entries. Sometimes (more than once) running
> crontab -u user -e
will simply hang, creating a tmp.something into /var/cron/tabs. This drives cron mad, eating up all the cycles it can. To fix is to basically pull a:
$ rm -rf /var/cron/tabs/tmp.*
$ killall cron -SIGHUP
Jan 22 17:57:59 server postfix/qmgr[29037]: warning: mail for [127.0.0.1]:10024 is using up 20000 of 20000 active queue entries
Jan 22 17:57:59 server postfix/qmgr[29037]: warning: you may need to reduce smtp-amavis connect and helo timeouts
Jan 22 17:57:59 server postfix/qmgr[29037]: warning: so that Postfix quickly skips unavailable hosts
Jan 22 17:57:59 server postfix/qmgr[29037]: warning: you may need to increase the main.cf minimal_backoff_time and maximal_backoff_time
Jan 22 17:57:59 server postfix/qmgr[29037]: warning: so that Postfix wastes less time on undeliverable mail
Jan 22 17:57:59 server postfix/qmgr[29037]: warning: you may need to increase the master.cf smtp-amavis process limit
Jan 22 17:57:59 server postfix/qmgr[29037]: warning: please avoid flushing the whole queue when you have
Jan 22 17:57:59 server postfix/qmgr[29037]: warning: lots of deferred mail, that is bad for performance
Jan 22 17:57:59 server postfix/qmgr[29037]: warning: to turn off these warnings specify: qmgr_clog_warn_time = 0
The solution (found from the postsuper manpage):
> mailq | tail +2 | awk 'BEGIN { RS = "" } / spam@host$/ { print $1 }' | tr -d '*!' | postsuper -d -
/ snip /
postsuper: Deleted: 39819 messages
The cause:
I wish I knew...
QT_WriteOBJECT_XHTML (
'myVRmovie.mov', 800, 600, '',
'controller', 'true',
'id', 'myvrmovie',
'cache', 'true',
'pan', getAngle ());
... where getAngle() just uses a cookie:
function getAngle ()
{
return document.cookie.split ('=')[1];
}
... which is set with setAngle () like thus:
function setAngle ()
{
document.cookie = 'angle=' + Math.floor (document.myvrmovie.GetPanAngle ());
}
Finally, the hotspots are wired to go through this function:
function openPage (url)
{
setAngle ();
window.location (url);
}
> cd ~/Library/Application\ Support/Camino/chrome
> cat > ./flashblock.css << EOF
/* Prevent flash animations from playing until you click on them. */
object[classid$=":D27CDB6E-AE6D-11cf-96B8-444553540000"],
object[codebase*="swflash.cab"],
object[type="application/x-shockwave-flash"],
embed[type="application/x-shockwave-flash"]
{ -moz-binding: url("http://www.cs.hmc.edu/~jruderma/clickToView.xml#ctv"); }
EOF
and then just include that css file in your userContent.css:
> echo "@import url(flashblock.css);" >> ./userContent.css
I think this is a pretty useful thing to do to Camino since many Flash objects seem to slow it down to a crawl.
The mobile phone market - 952 million units. Yeah,
but how many of those were actually smartphones? Hard
to find any exact evidence, but Symbian reports shipping 37 mil
units in 2006 and they're almost 73 % of the whole
smartphone market. In other words, smartphones
sell waaay less than digital cameras. Frankly, I'm
quite surprised they'd let this kind of bug slip
into the Keynote.
CalDAV support. One of the biggest reasons why
companies buy expensive Nokia Communicators with even
more expensive Exchange servers is they provide an
end-to-end "cross platform" (mobile + desktop)
solution. OK, you can make Exchange email work over
IMAP, but what about collaborative services, ie
calendards? Apple will be putting CalDAV support into Leopard server, but to this day
thre's not a single CalDAV client for mobiles out
there. Would've been nice if he'd touch on this
subject, or at least showed a glimpse of the
client running. Especially since 3'rd party
software will apparently not be supported on the
iPhone.
Good show otherwise. Apple TV looks really cool too.
Thinking of buying one just for the sake of trying to
make it work without iTunes (although I'm sure
someone will have had it figured out by the end of
this week).
One things's for sure - WWDC's gonna be awesome!
However, I found the Chrysler ad they run before
this story on time.com to be a little umm...
conflicting?

I have a fairly sarcastic sense of humour, but
even I don't get it. Are we or aren't we? Would be
kind of a downer if they ran that after the
story.
There's actually all sorts of goodies on their site. Like this Dashboard Widget that shows you how much music business there's out there or the realtime metrics visualizations. Plus, they look cool too!

/Applications/TextEdit.app > Show package contents > Contents > Resources
Duplicate rtf.icns and rename copy to doc.icns
From the Contents folder open Info.plist and into the CFBundleDocumentTypes array append:
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>doc</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>doc.icns</string>
<key>CFBundleTypeName</key>
<string>Microsoft Word Document</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>W8BN</string>
<string>W6BN</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
Then flush the LaunchServices cache (this will reset all document/app associations so be prepared to be annoyed):
> cd /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Support
> ./lsregister -kill -r -domain local -domain system -domain user
> priceOfMembership=99
> priceOfHardware=1408
> newPriceOfHardware=1275
> echo 'Total discount: ' $(($priceOfHardware-$newPriceOfHardware-$priceOfMembership)) 'EUR (' $(($newPriceOfHardware/$priceOfHardware*100)) '% )'
Total discount: 34 EUR ( 0 % )
The percentage is 0 because Bash's arithmetic's only deal with integer values (it's actually about 10%), but it may as well be, because you should also factor in the 30 min on the phone. From some online reports, you get the impression that the discount should be around 20 %. Is Apple discriminating it's European customers... again? It's bad enough they don't state the discount percentage in advance.
I'm having a hard time hiding my disappointment. All the hassle of getting the school papers, faxing them in, solving problems (it took more than 2 weeks for my student status to be verified, finally was able to get the student certificate in through email thanks to the helpful people at ADC, kudos to them) and waiting on the phone for 34 EUR? I understand that it's more useful when you buy something really expensive, but you'd think that student members aren't necessarily the ones driving those shiny Mac Pros or even MBP-s. Most of them can't even afford a Mac at all!!!
This was the first time I ever bought an ADC product. May very well be the last as well.
> sudo pmset displaysleep 1
is great, but requires root prvileges (due to some of the other things you can do with it) so it's out for any kind of automation/scripting purpose.
Enter Apple Remote Desktop. Among other niceties, ARD includes a CLI utility called systemsetup that you can use to set various system preferences, like so:
> /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/systemsetup -setdisplaysleep 30
Nice. Time to wrap this into something Mac-like and give it a keyboard shortcut:
property ARDPath : "/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/systemsetup"
set currSleep to do shell script ARDPath & " -getdisplaysleep"
if (currSleep) does not end with "1 minutes" then
set newSleep to 1
else
set newSleep to 30
end if
do shell script ARDPath & " -setdisplaysleep " & newSleep
Throw that into ~/Library/Scripts and give it a fitting shortcut in System Prefs/Keyboard & Mouse.
Pretty nice. I only wish QuickTime Player had such
a nice Automator Library...
