Archives / Search ›

Another day, another WordPress upgrade

Running WordPress 2.0.4 now. The upgrade took longer than expected, but I’ve documented what I need to do for next time, and upgraded a couple of my plugins as well. Hopefully nothing broke.

The ICeCoffEE 1.4.3 release went pretty well—I’ve received two crash reports, and one user claimed it didn’t work for him. One of the crashes is not my fault: Safari crashed during a page load triggered by a Command-click. For the other one, I discovered that I had completely stripped the distributed binaries, which isn’t too useful for debugging:

Thread 0 Crashed:
0   com.apple.CoreFoundation       	0x90853b76 CFBundleCopyLocalizedString + 106
1   net.sabi.ICeCoffEE             	0x002e5358 APEBundleMainLateLoad + 23883
2   net.sabi.ICeCoffEE             	0x002e569b APEBundleMainLateLoad + 24718

I haven’t yet figured out how to map those addresses back to the source code, so I’ll repost 1.4.3 with symbols later this weekend. It’s now less than a week until I leave for WWDC, the pace of my research work continues to quicken and I’ve got a lot left to arrange.

Terminal.app cloning script

I’ve been doing some Java programming locally on my Mac recently, and one thing I became frustrated at was navigating Java hierarchies in Terminal. Here are a few zsh snippets I wrote to help me:

clone() {
  local cmd ws
  if [ $# -eq 0 ]; then
    cmd="cd \"${PWD:q}\""
  else
    cmd="${@:q}"
  fi
  ws="{ WindowSettings = ( { ExecutionString = \"clear;${cmd:q}\"; } ); }"
  plutil -convert xml1 =(print ${ws:q}) -o /tmp/$$.term && \
  open /tmp/$$.term && \
  rm /tmp/$$.term
}

This one, if invoked with no arguments, creates a new Terminal window changed into the current directory. With arguments, it executes the named command in a new window.

After writing it, I did a quick Google search to see if anyone else had written something similar, and found this post by Marc Liyanage. Like I did originally, his version uses osascript, which is rather slow to start; so instead I write a temporary terminal settings file and open it. The plutil invocation is there to make sure I don’t end up creating an invalid plist; managing the quoting is a bit painful even with the power of zsh. Feel free to replace open with my launch utility, which will make it even faster.

The second one is rather simple and self-explanatory:

# ctrl-up arrow inserts "../"
bindkey -s '\eOa' '../'

When typing a long string of ../../../../, I tend to get the dots and slashes mixed up. Control-arrow mappings are not standardized (the one above is from rxvt), so you’ll have to configure it the Terminal inspector if you want to use it. With zsh‘s AUTO_CD option, you don’t need the cd to change directories, either.

The last one is extremely specialized, but if you need it, you need it:

upload() {
  local sddisk=${$(diskutil list | grep miniSD)[(w)-1]}
  local bndl
  if [ $# -eq 1 ]; then
    bndl="$1"
  else
    bndl=work/3.0/*.bndl
  fi
  print upload bundle ${~bndl} | pbcopy && \
	htconsole && [ ! -z $sddisk ] && disktool -e $sddisk
}

This one helps you upload bundles to the hiptop3 when you’ve got USB mass storage support enabled. It’ll copy the upload command to the clipboard, and unmount the device after htconsole exits. Replace “miniSD” with the volume name of your SD card.

ICeCoffEE 1.4.3 released

ICeCoffEE 1.4.3 is out, and it’s Intel native. Thanks to Sven-S. Porst for his help in getting it ported (which really just involved recompiling) and tested. This evening, I finally had a chance to test it for myself on a friend’s Intel iMac. Everything is so fast… can’t wait until I get a new machine myself.

Here’s a full list of changes:

  • Now a Universal Binary, compatible with Intel Macs
  • Updated to Application Enhancer (APE) 2.0.1 and Unsanity Installer 3.6.1
  • Supports Smart Crash Reports
  • Removed TEClick support
  • Added standard APE icon
  • Restored Services in recent Camino versions’ contextual menus
  • Fixed Terminal crash when clicking disabled minimize or close controls in Open dialog
  • Strips whitespace from URLs
  • Corrected Command-clicking behavior in development WebKit versions
  • Upgraded project to Xcode 2.3; various packaging improvements; eliminated pesky warnings from release build

I haven’t seen any new bugs or flakiness in my testing, but as always, if anything comes up, post a comment here or email icecoffee at sabi.net. Enjoy!

Going to WWDC; ICeCoffEE Intel

I’m going to be at Apple’s Worldwide Developers Conference next month, and hope to get a chance to meet all of my friends who have moved California-ward, as well as some people I have only known online. The only other WWDC I’ve been to was in 1999. Things have changed just a bit since the days of Mac OS X DP1 and the just-introduced bronze keyboard PowerBook G3s Apple gave away at the time. Not sure who I’ll be staying with yet, but I’ll be in California from August 5 to 13.

If you have an Intel Mac and are interested in testing the Intel version of ICeCoffEE (and aren’t already in the testing group), please email icecoffee at sabi.net. I’ll work on getting the installer ready this week; if nobody reports any problems, it should be ready to release by the weekend.

Setting display brightness: updated tool

Here is my cleaned-up brightness tool, which now uses the IOKit APIs instead of the weird O3Engine SPIs that the old version did.

Quick example:

% ./brightness 
usage: ./brightness [-m|-d display] [-v] <brightness>
   or: ./brightness -l [-v]
% ./brightness -l
display 0: main display, ID 0x4270a80
display 0: brightness 0.734375
% ./brightness -v 0.3
display 0: brightness 0.296875

-m changes the brightness of the main display; -d changes brightness of whatever display number/ID you provide. -l -v dumps display attributes—sorry for the ugly XML output, but CoreFoundation claims to be unable to output an OpenStep-format property list even though Cocoa has no problem doing the same.

(February 2014: Please see an updated version of this code on GitHub; it makes the -v output more readable among other changes.)

‹ Newer Posts  •  Older Posts ›