Archives / Search ›

Most incompatible blog ever

So I saw a link to this weblog on Planet Python, and thought it would be interesting to subscribe. But…

  • Even simple display of blog entries requires JavaScript, so they don’t render in NetNewsWire (where I have JavaScript disabled).
  • Even with JavaScript enabled, entries don’t render in released versions of Safari, and links to old posts are broken in Opera. Everything appears to work fine in Mozilla and WebKit trunk.
  • With browsers that actually load the pages, there’s often an annoying lag between when an empty page shell loads, apparently completely, and when the content deigns to appear. If you try to expand a post, the page inexplicably scrolls to the top for a second, before giving you what you asked for.
  • The RSS feed is titles-only, so I can’t read it that way either.
  • There are no visible permalinks on the site itself: every link just calls some JavaScript function or other.

So in order to find the first entry (which, conveniently, is #15) I had grab it from the RSS feed, or guess. The author is aware of the problems, as shown by a comment on that post. His name and email address, of course, appear nowhere apparent on the blog, but can be obtained through whois or his PyWeek entry (the latter seems to be a reasonably normal Web page).

After all that, the content is actually pretty decent, so I’ll remain subscribed; I’ll just curse loudly every time I have to switch browsers to view an entry. I look forward to version 2.0 implemented entirely in Flash.

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 ›