iPad? iPerfect (…for me)

- 2010-01-27 20:56:50

Google Groups is a pile of fail and hasn't posted my message in reply to a thread on Geekup so I'm blogging it instead.

On 27 Jan 2010, at 19:53, Steve Richardson wrote:
Thoughts?

I've been searching for a device to fit between my Macbook Pro and iPhone. I work all day on the MBP, and moving it to then watch video in another room or read twitter/news/mail whilst watching telly, etc is a pain.

The iPhone is a great little device on the move, but for trying to multitask at home it's a bit.. tedious. Even jailbroken and running multiple apps at once it's still limiting.

I'd been looking around at netbooks, but what put me off actually getting one was my previous experience with one. I know I'd want it to run OS X to keep in sync (easily) with my other Apple devices, but hackintoshing one was a bit too much hassle, plus the fact ones to hackintosh cost more than I really wanted to pay for something that wasn't quite what I thought I needed.

And then.. the iPad. I've been sort of keeping up with the rumours (mainly through Daring Fireball) and whilst I didn't get excited about it too much ahead of announcement1, having seen the official video of it it's pretty much guaranteed that I'm going to get one.

Yes, it's limited (App Store, closed device), but.. I don't care. Take the iPhone, it's good enough for doing things on it, even if someone else is in charge of the ecosystem and has a big finger saying yes or no. I (willingly) use iTunes, Mobile Me, all the things that are so wonderfully integrated in the world of Apple, so another device that consumes my media using channels I already know and use is just a massive win for me.

All I'm hoping now is that $499 doesn't equal £499. Hopefully it'll be £399, still a good £80 above direct exchange rate, but low enough that it's a no-brainer for me to get one.

…And I think this is the first Apple product that I've seen announced and actually known from the start why I'm going to get one, instead of just a knee-jerk "SHINY!!!! WANT!!!" reaction. Uh oh, does that make me an adult?

1 I miss getting really excited about apple announcements :(

Update

It just got even better. Was lamenting to a friend on IM that it'd be so much nicer once you can directly suck photos off a camera/SD card into it. Turns out there's an adapter for that. See "iPad Camera Connection Kit" at the bottom of http://www.apple.com/ipad/specs/ for details.

at(1) on OS X

- 2009-12-28 09:30:30

I recently came across the at(1) command, and wondered why it wasn't executing jobs I gave it on my machine. Had a poke around the man pages, and discovered in atrun(8) that by default launchd(8) has the atrun entry disabled.

To enable it (and have at jobs fire) you simply need to run the following command once:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist

Personally I've taken to using this to sleep my machine after a custom amount of time, mainly because my alarm clock/sleep timer of choice (Awaken) can't handle playing Spotify for x minutes and then sleeping the machine. The following command puts the machine to sleep, which (quite effectively) silences spotify.

echo "osascript -e 'tell app \"Finder\" to sleep'" | at 1:00am

See the at(1) manpage for how to specify the time, but as I'm only ever scheduling it on the same day (usually 20 minutes or so in advance), just passing the time works fine.

Read Later in a keystroke

- 2009-12-06 22:15:37

I use a wonderful service for saving text to be read later, instapaper.com. It's gotten more wonderful as time has gone on and other applications/service's have gained the ability to save links/articles/webpages there for me to pick up later.

For instance, I'm out and about checking twitter on my iPhone using tweetie and someone tweets a link. Rather than wait for it to load and having to read it then and there I can just hit "Read Later" and it's saved in my instapaper account for me to read as and when I choose to. Recently the legendary mac feed reader NetNewsWire gained this ability too.

There's a few ways to send a feed item to instapaper from within NNW. Firstly you can right-click and click "Send to Instapaper".

Send to Instapaper from contextual menu
View Original on Flickr

Secondly there's a menu item for it in the News menu, which also provides my chosen way of instapapering an item—the keyboard shortcut! ⌃P (control-P).

Send to Instapaper from News menu
View Original on Flickr

So, in NNW I'm happily sending stuff to instapaper with the handy ⌃P shortcut, but that doesn't exist in the third place I mark things to read later--Safari! Up until now I've been using the standard "Read Later" bookmarklet that instapaper.com provides, and it's got a spot on my Bookmarks Bar so I can easily click it.

That doesn't really help with the fact I'm hitting ⌃P in NNW, and it doesn't work in Safari. Quite often I noticed myself hitting the key combination in Safari and wondering for a split second why it wasn't sending the item to instapaper. Then the solution hit me!

In OS X you can setup (and/or override) menu items with custom key combinations! Why hadn't I remembered this before. Because the "Read Later" bookmark(let) is nested under the Bookmarks menu, it is a menu item! A quick trip into the Keyboards Prefpane in System Preferences and a new binding later and voilâ, "Read Later" in Safari is bound to ⌃P and I can use it in both Safari and NNW.

Filling in the form to bind the keyboard shortcut
View Original on Flickr

My Menubar Items

- 2009-12-06 12:56:49

This is a something that occasionally makes the rounds again, I've not seen it for a while and I've added some new items since I last remember documenting it. Thus, @macarne asking what the app was that gives me stats prompted me to document my current menubar items.

annotated-menubar by ©aius, on Flickr

View original

  1. SMCFanControl - Lets me adjust the minimum speed of my fans.
  2. Tweetie/mac
  3. iScrobbler - Scrobbles tunes iTunes plays
  4. LittleSnapper (Or more accurately the menubar icon is NanoSnapper, LittleSnapper is the full app.) Mainly used for screen grabs.
  5. SlimBatteryMonitor - Takes up less horizontal space than Apple's menu item.
  6. Expresscard menu item - Lets me power off my Expresscard/34 SSD
  7. MenuMeters - An old friend I've been using for as long as I can remember running OS X. Set to show (left to right)
    1. Ram - Used and Free totals.
    2. Network - Graph + values.
    3. CPU - Graph per core. Probably the most useful out of the three.
  8. Bluetooth
  9. Time Machine
  10. Modem - To dial on my Huawei E220 3G stick.
  11. Airport
  12. Sound
  13. Day/Time
  14. Fast User Switching - Not sure why I keep this in the menubar, only have one user and I lock my screen with a password protected screensaver.
  15. Viscosity - VPN software. Pretty useful.
  16. Spotlight! - Occasionally this vanishes when spotlight decides to be a dick and eat ram/cpu reindexing my disk every few hours. Touch wood it hasn't done it since 10.6.1.

Read standard input using Objective-C

- 2009-12-06 11:50:08

On a couple of occasions now I've wanted to read from STDIN into an Objective-C command line tool, and both times I've had to hunt quite a bit to find the answer because nothing shows up in google for the search terms I used. "Objective-c read from stdin" and "objc read stdin" both turn up results ranging from using NSInputStream to dropping some C++ in there.

The answer is quite simple really, just use NSFileHandle. More specifically +[NSFileHandle fileHandleWithStandardInput]. You can then read all data currently in STDIN, monitor it for new data and anything else you can do with a normal NSFileHandle.

And here's some example code, reads all data from STDIN and stores it into an NSString:

NSFileHandle *input = [NSFileHandle fileHandleWithStandardInput];
NSData *inputData = [NSData dataWithData:[input readDataToEndOfFile]];
NSString *inputString = [[NSString alloc] initWithData:inputData encoding:NSUTF8StringEncoding];

I'm using this in GarbageCollected apps, memory management without GC is left as an exercise to the user.