Markdown to Microsoft Word Service
Markdown to Word is a ginchy little service that will take Markdown-formatted text, and put it into Microsoft Word, making use of Word’s style sheets to do so.
This is in all ways identical in function to my previous TextMate script which does the same thing, except that this also auto-formats once in Word.
You may notice some funniness in the conversion. Lists, in particular, sometimes don’t convert perfectly. This is part of Apple’s textutil program, which is very handy, but sometimes a little… er… special in how it handles things. I take neither blame nor credit for its output.
IMPORTANT! This service relies on the setfile utility, included with Apple’s free “XCode” developer tools. You’ll need to have those installed (at least the developer applications).
And, of course, this program wouldn’t exist were it not for John Gruber’s “Markdown.” Mr. Gruber retains all copyright, etc., to said code. Disclaimers can be read below and are included with the Zip archive.
http://www.daringfireball.net/markdown
I am eternally grateful to Mr. Gruber for giving me Markdown. Without it, I’d probably be writing in LaTEX or something. Ugh.
Why You're All Wrong About the Insurance Debate!
I’ve always kept this blog as something of a geek-only site, but the current situation with the insurance overhaul is driving me nuts. The government is being accused of death panels, care rationing, raising our taxes, and more — even though these are EXACTLY the same things our private insurers are ALREADY DOING! So I’m taking my own little stand and sharing my thoughts with both of my readers.
WhichApp?
Update: It turns out that when you set an applet as the default application for some particular file type, it doesn’t “stick.” So now I suppose I need to go to ApplescriptObjC, since AppleScript Studio is dead… Ugh.
Do you ever find yourself unintentionally opening an HTML file in Safari, when you really want to open it in BBEdit; or watch Photoshop open up when you just wanted to preview a JPEG?
WhichApp is a little applet that aims to fix this problem. When you open a file with WhichApp, it will present you with a configurable list of applications you can use to open the file. Pick your favorite app, and you’re in business!
Just double click on the applet to build your list of applications. Get Info on a file, choose “Other…” as the default application, and then select WhichApp. Now every time you open that file, you can pick which program ought to open it! Change the setting for all files of that type, and you can avoid the frustration of opening the wrong program every time you open that kind of file!
And, yes, you can duplicate WhichApp and rename it as many times as you want so you can have different selection lists for different file types.
WhichApp was developed on Snow Leopard and hasn’t been tested anywhere else. It’s just an AppleScript, though, so it should work everywhere.
Evernote Services for Snow Leopard
Updated October 2, 2009!
With Snow Leopards new services support, I’ve updated the old “Send to Evernote” service to include three services:
Clip Text to Evernote: This is the original “Send to Evernote” service, with the improvements provided by Snow Leopard. This service takes selected text and turns it into an Evernote note. It will also grab the name of the frontmost window for the title of the note so that you’ll remember where you clipped it from.
Clip URLs to Evernote: This takes any selected URLs, and downloads the contents of those URLs into Evernote. Very handy if you have a reading list of URLs and want to save them for later.
Clip Files to Evernote: This will accept files and folders and attempt to clip them to Evernote. In some cases this will fail if the file isn’t supported by Evernote (although premium users can attach anything they want). If it is a supported file type, the document’s contents will become the note, rather than just attaching as a file.
Installation’s easy. Just unzip the archive, and put the services you wantin your ~/Library/Services/ folder (make one if it doesn’t already exist).
This will also let you get rid of the little elephant in your menu bar if you like.
Nik's Picks: iSSH
iSSH is a wonderful SSH client that goes beyond a simple terminal client, to nearly the remote access Swiss army knife of SSH on the desktop.
SSH is commonly used as both a remote terminal and also as a sort of VPN to access remote systems graphically. Apple has limited the iPhone in such a way that this is impossible. A SSH connection can only be maintained in a single app, and when that app is closed, so is the SSH connection — no other apps can access it.
iSSH gets around this by bundling in the two most common remote management systems: VNC and remote X11 applications. It also permits multiple simultaneous connections, so you can manage tasks between more than one server. (very useful in disaster recovery and server migrations)
As a terminal, iSSH is quite good. It supports custom fonts, different keymaps, copy and paste, and is in all ways a good solid terminal. Unlike other SSH apps, it also supports the legacy Telnet protocol and ANSI terminal emulation, in case you need to get your Tradewars on.
It also has a pretty easy way to get at non standard keys, such as arrows and modifier keys. A row of small buttons line the top of the screen, and you can scroll left and right to reveal more commands. This works all right, but I sometimes clicked the wrong key, even when scrolling, since the buttons are so small. This can be quite frustrating, and it made me miss TouchTerm’s floating key palettes.
iSSH also has the option of a “key pie” menu. This brings up a floating round control that reminds me of a remote control for a TV. It can contain multiple sets of fully custom buttons that can be used as modifiers, macros, or arrow keys. I wouldn’t mind seeing this concept completely replace the modifier keys at the top of the window.
VNC is well thought out and very flexible, thanks to the underlying SSH system for secure connections. You can connect in the clear, or using SSH tunneling, as well as tunneling to one server and then connecting openly to a second. Once connected, you have the normal sort of control, including window scaling, keyboard and mouse, and all the modifier keys you’d expect.
The winning feature here is the tunnel support. Performance over 3G is worse than some other VNC clients. Jaadu VNC can do the same SSH tricks and is generally a better VNC client, but it’s also much more expensive. For lighter or infrequent remote management, iSSH is great, especially for the price. (note that VNC is perfect for remote control of presentations — one more use for iSSH!)
X11 forwarding is very impressive, and quite a bit faster than SSH over slower connections (especially if you use something lighter weight than KDE or Gnome) But it’s limited to pure Unix systems, and more complex to set up than VNC, so it’s only a real benefit to the most die hard *nixers. That said, it works great, up until you run out of memory. (Which, on my 3G, was after just a couple of KDE apps — a 3GS would fare better)
The one limit on remote management is that only one graphical (VNC or X11) session can be active at once, although any number of terminals can run at once. (until you run out of memory, at least)
To wrap up, iSSH is fantastic. It gives you all the tools you need to remotely manage Unixish servers from your phone. (Windows, too, if you install the right open source tools) It might be just the thing to let a IT professional take a vacation without needing to drag along a laptop and stay near wifi in case disaster strikes at the datacenter. Or, for $5, it’s also just a handy tool for any *nix hobbyist.
Link: Using CSS to Do Anything: 50 Creative Examples and Tutorials
Thanks to Andy I for this terrific resource. CSS and web development in general really gets me down. I feel like I’m just fixing other people’s bugs all day long. Having a site like this one that inspires creativity is a real pleasure. At least until I try to make Drupal do it.
iPhone Users Aren't Cheapskates
I keep hearing developers complain that "iPhone users are cheapskates who won't pay for a quality application."
Mailhandler
I just started working with the Drupal Mailhandler module. I got jealous of Posterous, but I like geeking in Drupal so much that I couldn't bear switching over. (And yes, I know Posterous can handle cross-posting to Drupal -- I like this better) Very cool stuff. I can attach images and do all kinds of neat things.
Drupal continues to impress me with what it can do. I just think about something, like "can I post by email?" and a short search later, I find out that I can. It's wonderful.
This couldn't be more of a test post, so please don't worry yourself about all the images and files. I'm just working on themeing things. Or maybe not. :)
Your iPhone App is a 99¢ Lawnmower
Prowl + Drupal = Love
…I’ll have to post more about how I’m using Prowl these days.
BBEdit HTML to Text
This script uses BBEdit to convert HTML to lightly formatted text. Unlike BBEdit’s “Translate” utility, this maintains links, image ALT text, and even formats headers and bold text as all-caps. The formatting is ideal for making plain text versions of HTML email messages — which is the reason I created it in the first place.
For best results, drop this in the BBEdit Scripts folder. (you can open it from BBEdit’s script menu!)
Easy Apache Redirects and Site Aliases
Everybody knows about using .htaccess files to redirect, say, foo.com to www.foo.com. There’s lots of cookbooks out there for doing this. But I was in a different situation; I registered foo.com, foo.biz, foo.net, foo.org, foo.mobi, foo.us, and foo.info!
(Note: “Everybody” refers to apache sysadmins, and foo refers to a domain name that I do not want to advertise at this time.)
One way to handle this would be to set up a ServerAlias entry in the httpd.conf file for every one of these domains. While this works, it doesn’t redirect the domain. Instead I end up with duplicate content for every one of these many domains.
I could handle this by writing a .htaccess file that covers every combination of, say, foo.net, foo.org, foo.biz, and so forth for every domain, but that seemed like an awful lot of typing. Yet, for some reason, I couldn’t find much of anything on the web to make this easier.
It turns out this can all be handled in your httpd.conf file using the “Redirect” directive.
What you need to do is set up two virtual hosts. One is for the domain you’re re-directing to, and the other is for any and all domains you want to redirect from. Then you add a “Redirect permanent” directive as appropriate.
Here’s an example, in which I try to route foo.com to www.foo.com:
# This is the master domain
<VirtualHost *:80>
ServerName www.foo.com
DocumentRoot /var/www/foo.com
</VirtualHost>
# Redirect foo.com to www.foo.com
<VirtualHost *:80>
ServerName foo.com
Redirect permanent / http://www.foo.com
</VirtualHost>
Okay, this is actually more text that an .htaccess mod_rewrite statement, but look at what happens when I add ServerAliases to the redirecting virtual server:
# Redirect everything to www.foo.com
<VirtualHost *:80>
ServerName foo.com
ServerAlias *.foo.com
ServerAlias foo.net *.foo.net
ServerAlias foo.org *.foo.org
ServerAlias foo.biz *.foo.biz
[and so on...]
Redirect permanent / http://www.foo.com
</VirtualHost>
I can use the same syntax to do a 302, 303, 401 or any other sort of redirect as well.
If you have a fairly simple array of virtual hosts, you could also use the default “catch all” virtual host to redirect to your main site, thus avoiding any need to explicitly define tons of ServerAlias entries.
Sync Hole
Syncing the iPhone is a mess. Apple really dropped the ball by not providing a generalized sync framework to support third party apps.
Every time I want to take my iPhone out on the road with me, I need to go through and sync up every application individually: Here’s the song and dance for a full sync:
Open up 1Password on my Mac and on my iPhone, choose Sync from the iPhone, and wait for it to complete. (Sometimes I need to click through some password errors, too.
Open TextGuru on my iPhone and the TextGuru server application on my Mac and copy over any text files I’d like to share between the devices.
Open up Stanza on both my Mac and my phone and then open each book I want to carry with me and send it to the phone; one-by-one.
Load any files I want to take with me into FileMagnet uploader, open the app on my iPhone, and send them over. (Or, if I’m using Briefcase, turn on remote login on my Mac and browse it — I’ll cover file viewers/transfer apps in a later post.)
Open up SpeakEasy Connect to grab any recordings I want on my Mac from my phone.
Sync OmniFocus to .me (and then when I open it on the iPhone, it syncs up, so that’s something at least!)
Open up ByLine to pick up my Google Reader RSS feeds.
Likewise with Instapaper.
Did I mention I don’t use Safari as my main browser? So that’s a trip to BookDog to sync up my bookmarks from OmniWeb to Safari so that I’ll have ‘em on the phone.
Finally I’m ready to sync with iTunes, but to be sure I get the most out of this sync, I’ll check for new podcasts and application updates.
Dangit! I’m out of space for all my new files on my iPhone. Time to trim playlists, swap out movies, etc. I sure wish I could autofill the thing like I could on a shuffle!
And that’s if I happen to be on an available wifi network. Otherwise I also have to deal with Internet Sharing on my Mac!
Yeah, this is a worst-case scenario, of course. I don’t necessarily need to pick up new files or books, and I don’t always need to grab recordings. But if I intend to spend some time on an airplane or otherwise need to keep everything updated, this whole rigamarole can take as much as half an hour of fidding.
But because this is so time consuming, it’s not uncommon for my iPhone to be out of date, so I don’t have my latest passwords from 1Password, or I don’t have the movie I just rented from iTunes or eBook I’ve downloaded. (since I have to transfer it to the one device it lives on — grr!) Likewise, my Mac’s out of date from files I have on my phone. What a drag!
Some of these applications use Mobile Me or some other online service as an intermediary, so that I can sync asynchronously from my Mac or iPhone to a central server. Or ByLine syncs directly with Google Reader, so it acts like a normal RSS reader that way. But if I intend to be outside of wifi range, I have to remember to sync.
Compare this to my Palm handheld (recently retired in favor of my iPhone). I put it in the cradle and pressed the “sync” button. Any e-books or files waiting for transfer would transfer, passwords would be updated, content on the device would push back to my Mac. One click, and I was done. Palm provided a standard framework that developers could use to sync their applications’ data with my Mac and its programs.
Apple has done the same thing in the past, through iSync and Mobile Me/.Mac. However, they failed to extend this to the iPhone. Instead, every developer needs to build their own synchronization solution, with no standards whatsoever. Additionally, since there’s no background processing, there’s no method to keep the desktop and the phone in sync without forcing a manual process of opening every syncing program and doing your business, one program at a time.
Obviously there’s an underlying sync framework in iTunes, which can handle multiple content types (music, photos, email, contacts and calendars) from multiple data sources (Outlook on the PC; iPhoto, Mail, Address Book and iCal on the Mac; Google and Yahoo hosted services; and, of course, video and music through iTunes). And that’s all in addition to the built-in Mobile Me and IMAP services!
Apple dropped the ball on syncing with the iPhone. They need to build a synchronization API for developers, and they need to build it quickly before more programming time goes down the drain building half-assed custom sync solutions.
Fix for Software Update "Update could not be saved" error
I’ve occasionally had an error when installing software that goes something like “The update could not be saved… You do not have appropriate access privileges.” I’ve tried deleting the software update caches, fixing permissions, etc., all to no avail.
Well, this Apple discussion thread had the answer. You just have to delete a folder with the same name as your update from /Library/Updates. Or just delete everything, I suppose.
I had to delete the offending folder from the terminal using “sudo” for some reason. I guess it was set as root-owned or something. Weird.
Bookmark with Del.icio.us