Twitter Statuses Badge 0.7.1 Released ¬

2011-08-16

Or, this should’ve been done nine months ago.

When I released v0.7 of my Twitter Statuses JavaScript Badge back in November of last year, it was right around the time that Twitter was rolling out their new ‘snowflake’ status ID generator which was going to have some implications for languages such as JavaScript. Unfortunately, I didn’t become aware of this until I started seeing random issues with status IDs a couple months later. More unfortunately, I’m only getting around to applying the minor tweak to fix this, and a minor issue with applying the ‘last’ class when there’s only one LI element, now.

Without further ado, I present v0.7.1! Please accept my apologies for sitting on this issue for so long and let me know if you have any questions, comments, or feature requests. Also, the source code is on GitHub.

FYI – I started developing a major update back in March, including a few frequently requested features. Hopefully I’ll get that polished up sometime this year.

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:

  • trash can 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:

  • swuser gives 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 with screen.

Go download them all (clipcat, eject, swuser, and trash) or get the source code on github!

An AppleScript to Invert the Display in Grayscale (And Another to Revert) ¬

2010-12-17

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:

  • trash correctly 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.
  • eject now supports ejecting mounted network volumes and includes a -f option to force a stubborn volume to eject (to be used only in extreme cases).
  • clipcat is 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]