Archive for the ‘Mac’ Category
We have an old MacBook (the original white Intel model from 2006) running EyeTV as our telly.
Apple’s Magic Trackpad makes a handy remote control for this setup. Unfortunately, Bluetooth on the old MacBook is highly temperamental. Built-in Bluetooth regularly fails: out of the blue, the Mac decides that it has no Bluetooth module after all, puts a wavy line through the menu bar icon, and ignores the trackpad. The only fix for this is to shut the computer down, and leave it off for several minutes. This is annoying.
I had an old D-Link Bluetooth dongle (DBT-120), so I tried using this instead. This is better, in that the failure mode is less annoying. Using the dongle, the trackpad’s Bluetooth connection only fails after a prolonged sleep. It looks as if it’s still connected, with a dotted line across the Bluetooth icon, but it’s unresponsive. This can be fixed by simply unplugging and replugging the dongle. But that’s still a pain, and is rather a compromise of the ‘remote’ in remote control.
It turns out that the post-sleep unresponsiveness may also be fixed by restarting the Bluetooth daemon, by typing
sudo killall blued in the Terminal.
This is good news, because we can automate this action using sleepwatcher.
sudo killall blued in Terminal solves your Bluetooth issues after sleep, then you may want to use sleepwatcher too. (Note that after a
sudo command, you may be asked for a password. Nothing will show up as you type, but that’s OK: just type your password and press Return).
Updated May 2012 for Lion
The secret to getting the MySQL gem to install and function with Ruby 1.9.x on Snow Leopard or Lion is:
- Install MySQL using the 64-bit .DMG package installer from dev.mysql.com
- Install Ruby using RVM or (preferably) rbenv
- Add these to lines to
export PATH="/usr/local/mysql/bin:$PATH" export DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"
- In a new shell (Terminal window), type
gem install mysqlas normal.
I’m posting this mainly as a record for myself, having wasted a lot of time in the past trying strange incantations from comments on various other blogs posts.
PostGIS has an
st_askml function. This turns geometries into fragments of KML, and thus takes you most of the way to easy visualisation of spatial queries using Google Earth. But not all the way: these fragments have then to be assembled into a complete document.
I’ve written some wrapper and aggregate functions to automate this. They’re probably deeply inefficient — I wouldn’t advocate building your next web service on them — but for one-off eyeballing of query results I find them really useful.
The key functions are called
as_kmldoc; you could see them as the missing aggregate versions of
I recently switched to TextMate for editing Stata .do files: unlike Stata’s built-in editor on the Mac, it has syntax highlighting and other goodies via Timothy Beatty’s bundle (now hosted by Dan Byler).
One thing it doesn’t have, though, is tab completion. Or rather, it didn’t, until now.
Until Monday, O2 is offering a half-price USB dongle for pay-as-you-go mobile broadband. Buy it via Quidco, and you get not only the dongle but also a month’s access (or 3GB, whichever is the sooner) absolutely free.
So: free modem. No further commitment. And the opportunity to buy access a day at a time for £2, on a train journey, for example, or in an airport lounge, where the cheapest paid-for WiFi option is rarely less than £5, and often nearer £10. Handy.
Update. O2 is no longer doing the modem at half price, but the Quidco cashback has increased so that it still fully covers the modem and a £15 top-up.
Still, just one more copy of your data, in just one more continent, surely can’t do any harm, right? One that won’t burn down with your house, but also isn’t just wafting vaguely in the Cloud at someone else’s whim. One that elevates your backup system from sensibly paranoid to borderline OCD. One, in this case, brought to you by rsync, find and Growl.
Quick tip: you can get hold of some of Adobe’s very nice professional fonts for free when you download the InDesign CS4 trial (and possibly other CS4 apps too).
- Caslon Pro
- Chaparral Pro
- Garamond Pro
- Minion Pro
- Myriad Pro
If you don’t want to actually install InDesign, you can get to the fonts like so (if you’re a Mac user):
- Mount (double-click) the downloaded disk image
- Mount another disk image found on the newly mounted disk, at Adobe InDesign CS4/payloads/AdobeFontsAll/AdobeFontsAll.dmg
- The fonts are inside /Assets/contents on this second disk
Note that these fonts may well be covered by a very restrictive licence: I haven’t checked.
You might have noticed that Microsoft has lately started making available time-limited Virtual PC images of Windows installations with (separately) Internet Explorer versions 6, 7 and 8.
iWork and some other Mac apps provide the keyboard shortcut Apple-Alt-Shift-V for the extremely useful command Edit > Paste and match style. But Office 2008 provides no such equivalent for its equivalent command, Edit > Paste > Unformatted Text > OK. Annoying.
Happily, you can fix this with a strategically named and placed AppleScript. Open /Applications/AppleScript/Script Editor, and paste in the following lines:
tell application "Microsoft Word" paste special (text object of selection) data type paste text end tell
Save in /Users/YourUserName/Documents/Microsoft User Data/Word Script Menu Items as Paste unformatted\mosV.scpt (the backslashed bit at the end of the filename provides the shortcut). Restart Word and you can now paste without importing extraneous styles with Apple-Alt-Shift-V.
You might also try this alternative approach (via a handy comment elsewhere):
try set theClip to Unicode text of (the clipboard as record) tell application "Microsoft Word" to tell selection to type text text theClip end try
This has the advantage of leaving the cursor where you expect, at the end of the pasted text — the original script fragment leaves it at the beginning. And no,
type text text is sadly not a typo: that’s really how Word likes to be addressed.