Since the Bit.ly URL-shortening service is all the rage lately, and I hadn’t seen anyone create a Mac OS X Service for it yet, I decided to try my hand at it.
Here’s the result. The core is a relatively simple Python script and requires Mac OS X 10.5 (or Python 2.5 if you have an earlier version of Mac OS X). The Service was wrapped up with ThisService by Peter Hosey. It’s my first attempt at creating a Mac OS X Service — with or without ThisService — and I hope it works for you. However, it is provided “as-is” with no warranty.
That said, if you have comments or suggestions, please feel free to contact me.
Also, I’m not counting this as an endorsement of Bit.ly; I just looked at info on their site and thought I could probably script it and, as you can see, I did.
To install the Service:
To use it:
Of special note, however, is that if you shorten URLs with Bit.ly this way rather than through your browser, you probably won’t see them show up in your history (the most recent 15 URLs you’ve shortened). The script just shortens URLs for you and does so outside of your browser, so whatever cookies or other tracking Bit.ly is doing to generate your history, it doesn’t appear to carry over when using this simple little Service.
| Attachment | Size |
|---|---|
| ShortenUrlWithBitly.zip | 34.17 KB |
The Lullabot Web site has a clever way to help answer the question of “Is that site running Drupal?” Angie Byron mentions that the HTTP “Expires” header returned by Drupal corresponds to a specific default date. Look for that date in the HTTP headers, and you can make a reasonable guess that a site is a Drupal site — or at least one that hasn’t modified one of the core files.
Some commenters posted notes about how to do the same thing with wget and then curl. I expanded on the curl instructions to make them a little more robust (especially in the case of redirects or URL rewriting), and here’s the result:
$ curl -fsIL http://jaharmi.com/ 2>&1 | grep -q -m 1 "Expires: Sun, 19 Nov 1978 05:00:00 GMT" && echo "Yes, this appears to be a Drupal site." || echo "No, this does not appear to be a Drupal site."
Yes, this appears to be a Drupal site.
I’ve been thinking for a few months that Mac OS X 10.6 (or the like) would be introduced to developers at WWDC 2008. I’ve said as much to those unfortunate enough to be within earshot. I haven’t mentioned it here … and in recent days I’ve felt less confident about this gut feeling based on the public WWDC session schedule.
If Apple was trying to return to an 18-month release cycle for Mac OS X, my thought process went (after the CEO announced just such a push), a developer preview would almost have to be shown at this WWDC. That has lingered in the back of my mind. It also provided a reason to go to the conference if you were interested more in the Mac track than the iPhone.
Now there are rumors flying around, based on various strings in Apple software and from other sources, that there will be a preview release of Mac OS X 10.6 at WWDC. And it’s being referred to with the moniker, “Snow Leopard.”
If, as these rumors say, the upgrade will focus on reliability and security, then the general lack of room for schedules on it is more plausible. The name distinguishes it little from Leopard, but maybe just enough.
However, unless this release were more like the free-with-$20 shipping Mac OS X 10.1 update, who would buy it? Would Apple charge $129 retail for stability and security? It seems that there would have to be more.
I can definitely see that security could be enhanced by greater adoption of certain features — some reasonable candidates for further enhancement since Leopard — which are the focus of several sessions at WWDC, according to the published schedule.
Since I’m always watching for when old rumors swing back around, I’d guess that one additional change we could see is the mythical “Illuminous” user interface. (Assuming, of course, that this is not the unified interface style we already have in Leopard.) It usually takes two years for fun old rumors to become reality, if they ever do — that’s enough time for many to have forgotten about them and for actual development work to have taken place. A new interface with a new name would jack up the value of a new OS in some people’s minds. Moreso if it actually works better than the old one.
If the lack of PowerPC support were true, then this would be an astounding announcement. It would cut off upgrades for a large (but ever-decreasing) percentage of the Mac population. Already, Leopard itself was limited to G5s and the newest G4s. This could have an interesting effect on those institutional customers who bought G5s for their compute power. Let’s recall that although the Intel Macs have been out since January 2006 and the transition was relatively quick, the high end Power Mac and Xserve systems were the last to be replaced. For a while yet, there can still be Apple PowerPC-based systems that are less than three years old.
Ah, we’ll see what happens Monday. You never know with rumors. I have no inside information and even I wouldn’t make any important decisions based on these musings.
Does anyone else think that Apple has some ulterior motive for promoting Viva la Vida, the track on the new iTunes ad featuring Coldplay? That maybe its lyrics are indicative of something going on at Apple?
“When I ruled the world,” indeed.
No matter. I find it a fantastic visual treat and now the haunting music is stuck in my head. I would not be surprised if it were featured at WWDC 2008 in a few weeks.
Frankly, I had utterly ignored drag and drop tabs in Safari. This feature didn’t work in older versions of the app and only appeared in Safari 3, so I hadn’t yet adjusted to it. The recent article on tag dragging modes at Daring Fireball comes about a week after my own interest in the feature suddenly piqued.
So, yes, drag and drop for tabs appeared relatively late in Safari’s development. I fail to use this feature even though I’ve wanted it for a long time. Together, these facts buttress my conviction that certain features need to be in a product on day one, or they will not get used. I refer to this as the “PageMaker window” problem, for it wasn’t until PageMaker 6-ish that you could open up more than one document at a time in PageMaker. By that time, I’d been using PageMaker for long enough that I had user interface scar tissue built up around the single-window limitation. Even though I had a feature I wanted, it was left unused most of the time.
Even if I did want to use tag drag and drop, its behavior in Safari is weird. I probably wouldn’t have taken the time to understand what was going on if it hadn’t been for the DF post. Or, at least, I wouldn’t have realized there were different modes at all. (It’s like user-interface-by-Zork-text-adventure. You have to discover the odd set of steps — which make some sense in hindsight — that drops the critical key from the keyhole onto the placement you’ve carefully slid under the door.)
My own experience with Safari 3 has shown that if the tab is the leftmost one in a Safari window, dragging it in any direction results in both the inter- and intra-window drag behavior described on DF. That’s the only tab position that works in this manner, though.
I also thought that holding down Option or Command during a drag would make a difference; I could swear that happened last week when I tried drag and drop, but I must be wrong. I can’t reproduce it today.
Update: There’s an older article at Betalogue that describes tab drag and drop, and mentions the behavior of the first tab.
It looks like some recent change to the Google Analytics module for Drupal 5 broke my link to the Analytics service. Well, I’m being overbroad there. It really was working, but apparently only tracking when my administration account and users from a certain other user role (think: group) were logged in.
Well, obviously, that could lead to a significant traffic drop — if for no other reason than anonymous users weren’t being tracked — and that’s what I was seeing throughout my Analytics data. I only check Analytics every once in a while, and it’s currently only a curiosity to me, but it was still confusing as to why I saw all the graphs plunge starting March 7.
My best guess is that one of my recent module update binges loaded a new Google Analytics module which changed something, and only two user roles were set up to be tracked. (The Drupal 5 update process leaves something to be desired. Sure, I should have read the “read me” to find out about the change beforehand, but when you have so many modules to update, you just want to get it done. Wish it had warned me that something needed my attention.) Now that I’ve changed that setting and other user roles — including anonymous — will be tracked again, we’ll see what happens.
In order to figure out if I can upgrade to Drupal 6, I have to review the compatibility of the following modules I use under Drupal 5:
Not all of these are essential, of course. Heck, they aren’t even all enabled. But it will still take some time to review what modules I need and don’t need to make the site run in the way I’m accustomed to it running. Still, the urge to throw caution to the wind and upgrade blindly is certainly there.
The Achilles heel of Drupal, as I perceive it, is the core philosophy of “the drop is always moving.” Although I can appreciate that the software needs to break with tradition at times, the compatibility rat race is really painful.
I run a site. I want/need modules to make that happen. The modules are written for specific versions of Drupal. Each major version of Drupal has new module requirements. There’s no guarantee any module will be upgraded to work with the next version of Drupal. Old modules don’t even run in a reduce functionality state. It’s rather aggravating; there are modules I wanted to run that haven’t been upgraded since Drupal 4.6 or 4.7, so they weren’t even compatible with 5.x. The only recourse may be to upgrade the modules yourself if you are that interested in them, as I haven’t seen a bounty to upgrade a module work yet.
Of course, it’s worse if the module isn’t even hosted in Drupal’s contributed module repository (aka “contrib”).
Unfortunately, I’m not at a point where I feel I can contribute much to making the modules compatible with Drupal 6. Most of that work requires coding PHP and testing on a non-production site, two tasks I’m ill-equipped for right now.
Yes, I forgot to renew my domain. Yes, that became a real pain very quickly when I realized what the repercussions were.
For future generations, I suggest not having to deal with this when:
Lesson learned.
Anyway, it looks as if the long electronic nightmare of jaharmi.com being offline for Web and e-mail purposes has now ended. I can see this site. I can send and receive e-mail.
Good day.
I was trying to look at my very own site, which you see here, before I did the upgrade to Drupal 5.6. I got “access denied” errors on the home page!
After a little bit of trial and error, where I discovered that:
… I took one of the steps suggested on Drupal.org, and deleted the browser cookies related to the site. I quit Safari, relaunched it, connected, and it worked again. This was the first time I’d seen this with Drupal and I hope it’s not that common.
I spent some time with an agent on the online sales chat in the Apple Store last night. I had a few questions about the new Mac Pro models, and I got some interesting answers quickly. I’d recommend using the online sales chat if you have questions about your Mac purchase.
First, I wanted to know if both the Radeon HD 2600 XT and the GeForce 8800 GT had display rotation support. This is more useful to me now that I have a display that can rotate. As it turns out, both cards do support this.
Second, I asked about the AirPort Extreme card, which is a BTO option, because I wanted to know if it could be added later as a customer installable part. (Some items are not installable in Apple computers by customers, unless you want to void the warranty. The list of items varies by model and you can never assume that even commodity parts like RAM and hard disks are CIP. To my knowledge, there’s no Apple Web page that collects this information.) The Wi-Fi card can only be added at build time, or by an Apple authorized service center later. On the plus side, I noted in the specs that it supports 802.11n as well as the a, b, and g standards.
As for the increased cost of the Mac Pro’s only off-the-shelf configuration, the agent did bring up that the minimum RAM had been increased to 2 GB, the default hard disk had grown from 250 to 320 GB, and the processor had jumped from a dual 2.66 to a quad 2.8 GHz CPU. These are all fine and good, but the model that was for sale on Monday was the same model that went on sale in August 2006. Due to the relentless march of technological advancement I’d expect something better in January 2008, and not necessarily with this price increase.
I’m still going to wait to see what comes out at Macworld Expo next week. The price increase on the Mac Pro makes me wonder whether room was being made for something new between the professional tower and the Mac mini / iMac models. I’m still one of those people who remember with fondness that at one point, Power Mac G4 towers were reasonable options for home computers, with a starting price around $1199. Ever since the Power Mac G5, this economical option for an expandable system has been lost.