tools-osx 2011-06-02 ¬
2011-06-02
I’ve updated my collection of Mac OS X command line tools with improvements to the trash tool:
trashcan now list trash contents across all volumes (with a disk usage total) as well as empty the trash (including a secure empty option; both emptying operations require confirmation).
Note: Obviously, the new version of trash is now destructive. I have tested and use this myself, but I cannot guarantee it won’t securely erase your entire hard drive if it encounters some odd edge case and I cannot be held responsible for that. So, use at your own risk and keep backups!
Go download them all (clipcat, eject, swuser, and trash) or get the source code on github!
sde_newsletter v0.5 ¬
2011-03-28
I’ve got a very minor update to the sde_newsletter Textpattern plug-in. v0.5 word-wraps HTML & text content in message/part bodies to 78 characters (if possible) to prevent hard wrapping at 998 characters which tends to badly break HTML content.
The sde_newsletter plug-in helps build HTML, text, or multipart email messages from Textpattern pages (although, technically, you can use any web-facing source HTML & text). It’s straightforward and very powerful when paired with newsletter/mailing list software.
Update: I discovered a minor bug parsing page title from HTML if the TITLE element contains line breaks. This has been resolved in v0.5.1.
tools-osx 2011-02-25 ¬
2011-02-25
There’s been a small addition to my collection of Mac OS X command line tools:
swusergives you control of Mac OS X’s Fast User Switching from the command line, including options for switching to login window, user by name, or user by ID. Unfortunately, it’s not compatible withscreen.
Go download them all (clipcat, eject, swuser, and trash) or get the source code on github!
I’ve been doing a lot of early morning coding in bed, and have found that the only way I can do so without killing my eyes is to select “Use grayscale” as well as “White on Black” in the Universal Access preferences pane in System Preferences. This gives me a far more comfortable, inverted grayscale display. Unfortunately, it’s annoying and painful to initially set when my eyes are at their most sensitive.
I’ve modified a script posted on Apple Discussions to enable grayscale to also invert the display1 and saved it as a run-only application named Invert Display.app:
tell application "System Preferences" to activate
delay 1
tell application "System Events"
tell process "System Preferences"
click the menu item "Universal Access" of the menu "View" of menu bar 1
click the radio button "Seeing" of the first tab group of window "Universal Access"
if value of (checkbox "Use grayscale" of tab group 1 of window "Universal Access") is 0 then
click the checkbox "Use grayscale" of tab group 1 of window "Universal Access"
end if
-- click the radio button "White on Black" of tab group 1 of window "Universal Access"
end tell
key code 28 using {control down, option down, command down}
end tell
tell application "System Preferences" to quit
Naturally, I also created another to restore the settings and named it Restore Display.app:
tell application "System Preferences" to activate
delay 1
tell application "System Events"
tell process "System Preferences"
click the menu item "Universal Access" of the menu "View" of menu bar 1
click the radio button "Seeing" of the first tab group of window "Universal Access"
if value of (checkbox "Use grayscale" of tab group 1 of window "Universal Access") is 1 then
click the checkbox "Use grayscale" of tab group 1 of window "Universal Access"
end if
-- click the radio button "Black on White" of tab group 1 of window "Universal Access"
end tell
key code 28 using {control down, option down, command down}
end tell
tell application "System Preferences" to quit
I just launch them from Spotlight as needed. It’s a little distracting to see System Preferences launch and do it’s thing, but far easier than doing it myself when my eyes are being seared out of their sockets.
1 – Note that I’ve left the line for selecting the “White on Black” radio button in the script, but commented out, in case someone can catch the reason it throws an error. Since I’m in the preference pane anyway, it seems silly to use key code, plus I’d rather be able to verify it’s actually selected (like I do with the checkbox) so I’m not blindly toggling.
tools-osx 2010-12-08 ¬
2010-12-09
I’ve got a new release of my collection of Mac OS X command line tools for you, including:
trashcorrectly increments filenames (à la Finder) if the same filename already exists in your Trash instead of complaining that the file already exists. It also has a teensiest bit more logic regarding trash on the boot volume vs. other volumes.ejectnow supports ejecting mounted network volumes and includes a-foption to force a stubborn volume to eject (to be used only in extreme cases).clipcatis a new addition, submitted by David Kendal, which allows printing & concatenating of Text Clippings!
Go ahead and download them or grab the source code on github!
tntk Command Line Newton Compiler ¬
2010-11-24
Yesterday, Eckhart Köppen announced that he’s started piecing together a command line Newton compiler named tntk, based on NEWT/0 & DCL:
So far my experiments are actually quite successful, and it seems that developing Newton applications with just a text editor is not that impractical. […] Some things are still missing for developing larger apps, like the ability to split the code into multiple source files, and a way to embed resources into the final package, but for simple applications (and even auto parts), we might have a way forward.
This is nowhere as ambitious as Matthias Melcher’s DyneTK project, but maybe good enough to get people interested in a bit of Newton hacking.
It’s not really far enough along for a release yet, but you can peek at the Subversion repository if you’re so inclined.
I have a PowerMac 9500 configured for Newton development purposes, among others, but it’s inconvenient at best when I’m actually inspired to do any Newton development. As Eckhart alludes to, dealing with Mac NTK’s binary files w/resource forks in version control is a major pain.
[Via NewtonTalk]
Twitter Statuses Badge V0.7 Released ¬
2010-11-10
I’ve just released Twitter Statuses JavaScript Badge v0.7 which includes the following improvements:
- Support for searches as or the usual individual user’s statuses.
- Now using John Gruber’s Improved Liberal, Accurate Regex Pattern for Matching URLs
- More flexible adding of classes (incl. a new ‘reply’ class).
- The examples (yes, there’s a new one for search) use purely CSS rendering (no images).
And, here’s the search example:

Drop me a line if you have any questions, comments, improvements, or feature requests. I have a few more features planned for the next release.

