Joe Maller.com

AppleScript source links from TextMate

AppleScript’s URL Protocol Support allows the full source code of an AppleScript to be shared through an encoded URL. Here’s a short little TextMate Command for converting AppleScripts to encoded URLs.

Create a new command in TextMate’s AppleScript bundle with the following code:

#!/usr/bin/env ruby -KA -rcgi
src = CGI.escape(STDIN.read)
src = src.gsub('+', '%20')
src = 'applescript://com.apple.scripteditor?action=new&script=' + src
`echo -n "#{src}" | pbcopy`
print "The URL encoded AppleScript was copied to the clipboard"

There’s no reason this idea can’t be used for all sorts of stuff. So why not make it easier, it’s not AppleScript, but here’s that code in Script Editor for easier copying.

This is exceptionally fast, much faster than Apple’s provided encoding script. As an extreme example, converting the 558 lines of my iPhoto Date Reset script took just under a minute using Apple’s script. The little Ruby script in TextMate does it instantly. (running the AppleScript in Script Editor with the Event Log Window open took nearly 7 minutes.)

Update: I committed this command to the TextMate Bundles repository and it’s now included in the default set of Bundles shipping with TextMate. (And slightly improved by other TextMate bundle developers)

Share |

link: May 24, 2006 1:43 pm
posted in: misc.
Tags: , , ,

RFC 822 Dates with AppleScript

Here’s a little AppleScript subroutine which converts date objects into correctly formatted RFC date strings: RFCdate() (click to open in Script Editor)

This is a timesaver for anything related to RSS, which requires dates be in the RFC 822 format, ie. Wed, 24 May 2006 01:30:22 -0400


Avon Walk for Breast Cancer [research]

My cousin Sarah, a breast cancer survivor, will be participating in her first Avon Walk for Breast Cancer on July 8-9 in San Francisco, she has been using the http://thebustboosters.com/breast-actives-full-product-review products and she has recovered pretty well. She already met her fundraising goals, but it’d be great if she raised a little more.

Share |

link: May 10, 2006 10:36 pm
posted in: misc.

Original Star Wars and HiDef DVDs

John Gruber linked to the news that Lucas is giving in to demand (eg. money) and will finally release the Star Wars trilogy on DVD in their original, unaltered theatrical format. Han shoots first. John writes:

Bastards. I broke down and finally bought the current DVD trilogy collection just a few months ago now I’ve got to pay for it yet again just to get the versions of the films that I really want.

Hold your wallet. The release will be in SD, despite the news that HD DVDs will start appearing in stores this summer. Lucas, who is as brilliant a money-maker as he is a horrible dialog-writer, will rake in tons of money selling an obsolete DVD. All the Star Wars films will be available again in HiDef soon enough. And too many people will buy them all for the third, fourth or fifth time.

Lucas isn’t alone. All the studios are flooding the DVD market right now to sell as much as possible before the switch to Blu-Ray or HD-DVD.

Supposedly the porn industry likes likes Blu-Ray best, but you’d have to be delusional to think physical pornography sales are anywhere near as strong as they were before the Internet. Still, porn is generally credited with choosing VHS over BetaMax, at least this time they seem to be going with the better format.

Personally, I think HD-DVD may win this time. Not because it’s better, but because “Blu-Ray” is a dumb name. Ask any non-technical consumer what they want for their new HD TV, HD-DVDs or Blu-Ray disks. Sure a certain percentage of people will have Blu-Ray explained to them, “see, they’re both HD,” but how many will buy on name alone?

Never mind that the name itself looks (and sounds) like blurry. Not what you want to hear when dropping a lot of money to replace a bunch of movies you bought in SD a few years ago.

And so the studios might be slitting their own throats. Movie attendance is down over the past several years. Partly movies are kind of boring now, also suspense and action movies keep dancing around what’s really scary. But the studios now want consumers to re-buy movies they just bought. The great DVD migration wasn’t that long ago, most DVDs were probably purchased within the past 5 years. But now Hollywood wants everyone to buy those movies yet again, and they’re going to spend a fortune on conversion and manufacturing in a bet that consumers will buy the new disks. And if we don’t? Lots of bankruptcies.


If they were called poofter penguins or something…

Apparently Sea World in Queensland are renaming their Fairy Penguins to “Little Penguins” in a pathetically unnecessary grasp at political correctness.

This quote by Gold Coast Breakers chairman Kamahl Fox is the highlight

“I wouldn’t be upset by fairy penguins at all. I don’t think our community is that sensitive about those things. If the penguins were called poofter penguins or something more direct then it might be a problem, but I don’t see the name fairy penguin as a mickey-take at all.”

No word on how New York’s own “fairy” penguins received the news.

Wikipedia, as usual, takes all the fun out of this. Apparently “little penguin” is the more common name for Eudyptula minor, Fairy Penguins is the popular Aussie name for the little birds.

I’m all for sticking it to political correctness, but that seems like a rather significant bit of information that should have been included, it’s not like Wikipedia is some obscure resource. The same story as reported by the Herald Sun does sort of mention it at the end, they also had more fun with the title, Gay old time over a little fairy bird

Share |

link: Apr 18, 2006 8:28 pm
posted in: misc.

FXScript Reference comments are enabled again

I turned on comments again for The FXScript Reference, hopefully the spammers won’t show up right away.

24 hours later… It only took four hours for the first drug spams to appear, four in 24 hours and zillions of referrer hits.

This time I’m going to try something different. Almost everything is posted to the k30fps constant, which isn’t particularly interesting, for whatever reason the spammers are pounding that page. So I’m reassigning k30fps which will change its url, I’m also and adding a custom rule to 403 that page. (otherwise they’ll bring down my 404/search page).

The vengeful part of me would love to forward the spammer’s requests to some huge file or link to their Windows Registry or something. But I’m not going to waste someone else’s bandwidth and I don’t want some innocent user to end up borking their registry because of me. Akismet, someday.

Share |

link: Apr 16, 2006 3:04 pm
posted in: misc.
Tags:

Looking for Web Hosting

I’ve been asked to move IOP’s web and email hosting off Hosting Matters after an excess of problems. One of the biggest issues is that we always have emails flying around with large attachments, these tend to fill up the smallish space HM provides. To be fair, HM has been very good about fixing stuff when it breaks, but there’s been a lot of stuff to fix. Also, they don’t offer phone support, don’t take American Express and their billing system is a pain to use.

I host my own sites and several others on LiquidWeb, which has been excellent for the past several years. I really have nothing to complain about, except maybe that they don’t have a more recent version of MySQL installed, apparently due to a CPanel dependency.

I would move IOP over to LiquidWeb too, but I don’t want to have all the sites I’m responsible for hosted by one company. With multiple locations, I have many more options should one host suffer a catastrophic failure.

Researching web hosting is miserable. Google’s results are heavily spammed, and while sites like WebHostingTalk are helpful, they tend to be full of casual users looking for a zillion TB/month for $2.95. I was considering DreamHost after some time on those boards, but there are a lot disgruntled former-customers out there and I was troubled by DH’s CPU time metering. I’m still thinking about them simply for a cheap off-site Subversion repository and Jabber server. However their whole referral thing is actually a huge turn off for me, I’d rather their customers were genuinely fans of the service. That program makes me question the credibility of anyone advocating for DH.

I was also close to signing up with MediaTemple, but their shared hosting plans don’t include rsync. Rsync is a critical tool for local mirroring and development and a deal-breaker.

Jim Boykin ‘s page asking for web hosting advice is a nice resource. There are some good links in there and I’m looking into several of the places from his roundup.

My current shortlist is pair Networks, Swift Communications and TextDrive, wanting to lean towards TextDrive because their users seem really happy and I’ve been reading John Gruber for years, but he doesn’t host his site there (yet?).

Suggestions are welcomed, my requirements are basically:

  • good email support
  • PHP/MySQL
  • SSH access
  • rsync
  • lots of storage space (>1gb)
  • $20-40/month

Update

I ended up going with Swift Communications, based largely on two factors. First, they were very fast in answering my pre-sales questions. Second, they offered the best cost per gigabyte of my three finalists.

The domain is already switched over and everything seems good so far. Server response is fast and SSH/rsync worked right away. Their support continued to be excellent after opening my account. They had initially set up our account login based on my name, which wasn’t ideal since this is a company site, but this was changed within 5 minutes of me requesting it. The move seems to have gone exceptionally smoothly and I’m very happy so far.



« Previous PageNext Page »