DIVID Technology Riffraff & Whatnot

by Kevin Bassham, Web Interface Developer

Coda Webkit Nightly

Have you ever wanted to run the nightly version of Webkit inside Coda? This used to be possible with an app called CodaKit, but it no longer works in OS X 10.7, so I made a quick replacement in automator.

http://dividtechnology.com/filechute/CodaKit.rar

(Bear in mind, this won’t do much if you don’t already have both Coda and Webkit nightly installed.)

IPFW Firewall

undercover.png On a mac or linux computer, there’s a server-grade firewall that’s not enabled unless you elect to run it. Even the application firewall on a mac isn’t very robust. So, for those of you who do use the unix ipfw firewall, this is a nice reference:
http://www.ibiblio.org/macsupport/ipfw/
http://www.ibiblio.org/macsupport/ipfw/firewall_2

Although it looks a bit outdated, there are good examples here, and I found it more intuitive to setup as a reductive ruleset rather than the more discombobulated output from rulesets in waterroof (which is a great tool, btw). This method is legible and less error-prone even without a GUI helper.

Revisiting “Best Practices”

Great piece on how and why we should review the current state of things as responsible web developers. Getting rusty – we need new best practices for a different development world

Mail Contact Photos for RSS

Mail 5 in Lion includes a view option to show contact photos in the message list. This is great for people, but what about RSS? Instead of a generic person icon, you can get something better. Create an Address Book contact with each feed author listed in the email block (they don’t have to be actual addresses). To find the rss author or group name, save a copy of a feed item and look for the “X-Mail-Rss-Source-Name” in the .eml file. Depending on the contact you setup, you may need to organize your feeds or smart mailboxes by conversation to see the result.

Screen Shot 2011-07-20 at 4.32.35 PM.PNG

Digital Color Meter in Lion

The Digital Color Meter utility in Mac OS X 10.7 no longer converts hex colors or copy to clipboard. The global utility color chooser palette does, and can be made more readily available. Just open Applescript Editor and type the words “choose color” and save as an application. Thanks to macosxhints for this tip.

http://hints.macworld.com/article.php?story=20060408050920158

Parallels Desktop fix for Lion

Parallels Desktop 6 hasn’t (at time of this writing) been updated to work with OS X 10.7 Lion. There’s some good info on the Parallels forums for a workaround. The short version of this is there are a few extensions that need to be loaded, which you could do by running these commands int Terminal:

sudo kextutil "/Library/Parallels/Parallels Service.app/Contents/Kexts/10.6/prl_hypervisor.kext"
sudo kextutil "/Library/Parallels/Parallels Service.app/Contents/Kexts/10.6/prl_hid_hook.kext"
sudo kextutil "/Library/Parallels/Parallels Service.app/Contents/Kexts/10.6/prl_usb_connect.kext"
sudo kextutil "/Library/Parallels/Parallels Service.app/Contents/Kexts/10.6/prl_netbridge.kext"
sudo kextutil "/Library/Parallels/Parallels Service.app/Contents/Kexts/10.6/prl_vnic.kext"

But that has to be done for every reboot, and isn’t very user friendly. So if you know your way around Launchd or have an app by Peter Borg called Lingon, you can make a quick launchdaemon that will handle it for you.

1.) Install Lingon from http://peterborgapps.com/lingon/

2.) Create a shell script with the above lines, but remove all instances of “sudo”. I added a return between the lines too. To make this executable, do a chmod +x [filename.sh] in terminal.

3.) In Lingon, create a new “user daemon” which will run as root, and point it to your shell script created in step 2. Check the box to run it when it is loaded by the system.

4.) Reboot and enjoy Parallels. Shared networking is not functional, let me know if you find a way to fix this. For now, you can use Bridged networking.

Building webkit2 from source

201103071647.jpgFor early adopters that want to test webkit2 without upgrading OS X 10.7 Lion developer preview, here’s a way to build it from source and run it from the webkit nightly app. Before we continue, a little background on webkit2, from macrumors:

“Starting in Mac OS X Lion, we’ve learned that Apple has started utilizing WebKit2 in their Safari web browser. The advanced version of Apple’s Webkit engine was first announced in April of 2010. WebKit2 is described as a new API layer for WebKit that offers both speed and security improvements:

WebKit2 is a new API layer for WebKit designed from the ground up to support a split process model, where the web content (JavaScript, HTML, layout, etc) lives in a separate process from the application UI. This model is very similar to what Google Chrome offers, with the major difference being that we have built the process split model directly into the framework, allowing other clients of WebKit to use it.

For the end user, the result should be a faster and more stable browsing experience. If a webpage crashes or hangs, only that single tab is affected rather than the whole browser. Subjective reports from early end users have indicated that the new Safari seems to run smoother.”

Before we start, a little disclaimer. This build will not show the new 10.7 UI changes that feature multi-touch and disappearing scrollbars, zoom to text, etc. because those are handled in the application interface and probably rely on frameworks only available in the developer preview version of Lion. As far as I can tell, downloading a nightly binary is the same as building it from source, but this is just for those who want to do it anyway.

1.) Download the standard webkit nightly build as an application. (you can stop here, or go on to build from source and we’ll use this application to run the compiled result)

2.) Run this in terminal, or use an SVN client. “svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit”

3.) Run the “build-webkit” script, which builds webkit2 by default: “./WebKit/Tools/Scripts/build-webkit” —This takes a while

4.) Make an Automator action, choose “run shell script”, paste this code, and save as an application: “

#!/bin/sh
~/webkit2/WebKit/Tools/Scripts/run-webkit-app /Applications/Webkit.app
exit 0

5.) Enjoy the fruits of your compute cycles. You can verify it worked by checking your user agent string at a site like http://whatismyuseragent.dotdoh.com/

e-mail for the rest of us

Despite Google’s best efforts with Wave, e-mail is still one of the main communication channels in modern business. We all use some variant of POP or IMAP for casual e-mail, but offices commonly utilize Exchange. Disclaimer: These notes are from my personal experience and may not adequately reflect the views of others.

If you’re on Windows, stop reading here. I’m on a mac (boat!) so choosing an e-mail client at work has it’s woes. Even with the latest OS X 10.6 native Exchange support has left us wanting just a bit more. I’m not sure if the disconnect is with Microsoft’s protocol exposure or what, but the end result has been that Mail.app in Snow Leopard is useable and mostly pleasant but still lacks a few features that can become a nuisance.

Calendars
Using Apple Mail, iCal will serve as the scheduling agent, and optionally integrates with Exchange. It does not, however allow you to choose how you reply to meeting requests or if at all. That’s probably the biggest issue. There are third-party utilities that try to alleviate this problem but aren’t a replacement for what should be built-in functionality IMHO. Just beware if you go dragging around appointments willy-nilly. Adding other Caldav or Gmail calendars is a no-brainer and works flawlessly. Outlook doesn’t support other calendar types.

Messages
We’ve all tried the fancy signatures. Well don’t. At least if you’re using Apple Mail and planning on sending e-mails to the rest of the world. Those who use Windows will see some random 2k attachments with all your fancy sig handiwork, which isn’t as svelte as you may have intended. Choosing the default encoding doesn’t seem to help, and even that isn’t a visible option in Mail preferences. Just K.I.S.S. or use another e-mail client.

Handling messages is done well with either Apple Mail or Microsoft Outlook for mac, but we’ve seen a few differences to point out. First, the POP/IMAP support in Apple Mail is superior to Outlook, and we’d expect this is due to the apparent rewrite of the latest Outlook version, which was ported from Entourage in the previous version. While the performance of the rest of the Office 2010 is superb, the mail client still doesn’t match up to the refined OS X Mail app. If you’re interested in control and performance, Outlook isn’t your friend. Another thing the native client does well is rules and handy features like RSS support and system-wide todo lists.

Compatibility
While I lamented the performance of Outlook compared to Apple Mail, the compatibility may be easily outweighed by how efficient it is at delivering your messages in the intended format. You can attach things without worrying if they will be received in the same manner, and can rest assured that meeting responses and requests will be handled well. The IMAP support is a little sketchy with Gmail because folders may get duplicated or corrupted, as did mine. So apart from not supporting other calendar types than Exchange and not handling other types of e-mail well, the Outlook client aces at least one portion of the compatibility tests.

So, after a happy trial with the latest from the mainstream, I’m going back to my less than perfect support for Exchange and happily dealing with the two workarounds (calendar responses and attachments) necessary to be a good netizen in our work environment, and enjoying the great performance and better compatibility for the rest of my connections on the web. Web apps like OWA and Gmail also handle these issues in their own right, but aren’t as state aware or persistent and archivable as a desktop app. To each his own, just my 2¢.

Hot App Roundup

Image credit taragana Everyone does this, but I’m not seeing MY favorites out there, so here goes. You’ll have to fetch the details yourself, I’m lazy today. Oh ok, if you insist.

Isolator, Nocturne, Quicksilver, Pathfinder, Transmit, Coda, Adium, Fluid, Motion, iStat, Blitz, Times, Bodega, Writeroom, VMware, and Automator is great too, but that’s a given. I also would mention the Webkit backend and all of unix, but that wouldn’t really be considered an app, but I digress. I’m sure I left several out, but these are the suprisingly enjoyable examples to remember.

Browser CSS History vulnerability userscript

For some time now, script kiddies have been able to read history from browsers by reading visited links. http://wtikay.com/docs/details.html This is where I found the best background information. http://startpanic.com/ Can tell you if you are affected. So I whipped up a userscript for that, should work in Firefox, Safari, and Chrome.

Download the userscript here: http://userscripts.org/scripts/show/77120