|
Mac GeekeryGet your geek on. |
ComplicatedThere’s nothing worse than an application that hides its data … no, your data from you. As a developer, you should take into account your experience as a user and avoid lock-in as much as possible, as well as enable useful “mashups” with other applications. To make it easier for users to use both your application and another with the same set of their data, you need to make it easy for users to get that data out of your application. You could support every common export type for your kind of data and hope that’s enough, or you could create a simple API to get at the data so that your users can do the work of making those exports. On the Mac, the easiest and most standard way of doing the latter is AppleScript. With AppleScript you can setup a basic description of where you keep your data and let Cocoa Scripting take over and pull it all out of your program for you without you needing to change much at all. You’ll get features like searching and basic property editing for free. It’s quick, easy, and wonderful. Unless you’re using Core Data. Like many other features in Mac OS X, gaining all the benefits of Core Data exempts you from the “easy” part that comes with the rest of the OS (like, oh, threading and autosave-enabled NSDocuments, for instance). It doesn’t make it impossible, it just makes it a very slight more interesting. In fact, making a read-only AppleScript interface is rather simple. Making a read/write interface is a minor pain in the posterior. Today, I’ll go over how to make a read-only interface and touch on the difficulties of making a read/write interface with Core Data. Later, I plan on covering the read/write interface when I’ve solved the ills of doing so and can explain how I got it to work. So much of this is “hold the bunny ears halfway up and lift your right leg towards the south” that it’s sometimes hard to say how something is working, or not.There's more » I’d pretend that I have a more productive use for these ideas, but I don’t. I wanted to nab all of Order of the Stick and xkcd because I hate clicking through pages and then scrolling down for long images only to scroll back up for the next one. I figured that if I had them all, then I could just open up a batch, set Preview’s window once, and then thumb through them offline. To balance the karma from such a leech event I’ll just get some things from each comic’s shop (regexp/science) and the universe will still be happy and sunny and annoying and stuff. I started with OoTS and went to the first comic. Looking at the URL for the comic image itself, I saw that it was a sequential number, one for each comic. Well, that’s remarkably easy as I then used However, the last hundred or so didn’t come through like that, so I went to the page and pondered why. When I checked the URL of the image to see if it had moved, I realized that someone was on to people like me. It’s in the same place, but it’s been named with a random hash for a filename. Good job, you just made this a challenge.There's more » The ATI Displays panel is a tool from ATI that enables users to tweak some OpenGL pixel format and texture options that otherwise couldn't be touched in OS X. Most importantly, it lets users choose antialiasing and anisotropic filtering options. ATI is pretty bad about not getting new versions out for OEM cards, so poor folks that own Mac Pros with the X1900 XT have been stuck outside. This probably also works for other Intel Macs with X1000 series chips.There's more » As an admin, sometimes you want to tweak the dock a bit when you can’t sit at the Mac or VNC in to it. Luckily, the Dock is governed by a plist that’s a bit cryptic, but is otherwise fairly easy to tweak. I used this quite a bit, back in the day, but when a friend asked me for it recently, I had to dig around quite a bit to find the darn thing.There's more » I need a script that would pull the identifier from the name of a drive. For example I have a drive mounted called “Wintermute”. I need a command that would take that name and pull (for example) “disk1s3” as the identifier for that drive and drop that into a command that I need to run as part of a cron. I am fine with the process of dropping that into a command once it is retrieved, I just need the process of pulling the identifier. How would I go about doing this? Brian You no longer need Windows. Now, it can all be done on your Mac. Everything from fetching the files from the TiVo to the decrypt and playback can be accomplished on the Mac side. This all due to some great work by the guys on the TiVo Decode and Galleon projects. Let’s get started. A short road map of where we’re going:
This article discusses a method to automate the process of getting the files off the TiVo and into Front Row/iPod format. If you just want to convert a single file then just run Note the updated scripts at the end of the article that resolve some issues with catching files in their varying states. These appear to get it right almost all of the time now.There's more » I’m a huge fan of .Mac for one – and exactly one – reason: Backup. Hang around me enough and I’ll make sure you’re using .Mac Backup before too long. But this isn’t about selling you on it, this is about making .Mac Backup even more useful by hacking up QuickPicks. QuickPicks are pre-rolled backup plans that snag specific types of files or data files that are integral to a specific purpose. Examples include QuickPicks that scrounge your home directory for all Word documents or that backup your iPhoto Library. Apple bundles a small smattering of QuickPicks with .Mac Backup and many apps install handy QuickPicks of their own, but it turns out we can make QuickPicks ourselves with a little effort. While OS X is rather heavily laden with XML all over the place, Apple chose to make the QuickPicks definition file a ‘strings’ file, but that’s not the end of the world since it’s still an easily read and modified text file. If you “Show Package Contents” on any of the standard QuickPicks in As a way to more easily play movies from ripped DVDs, I have started setting the “Movie” folder (the folder which contains the VIDEO_TS and AUDIO_TS folders which generally is the name of the movie) as a “Bundle Bit” via the Path Finder Get Info pane (I would imagine that it works the same in the Finder as well), giving the folder an extension of “.dvdmovie” (the extension could be just about anything so long as there are no conflicts with existing extensions), and informing the system that I would like all files with said extension to open via VLC so that all I need to do is double click the new bundle bit and watch the movie. This works extremely well (I really prefer not to use DVD Player as it doesn’t always play ripped movies correctly), but I have one problem. All of my new “.dvdmovie” bundles have the generic “Document” icon which is unsightly. How do I make the system (via GUI, Applescript, command line, or hacking) apply a specific icon to all of my new “.dvdmovie” bundles, and to future ones as they are made? I would think that there is a way short of manually assigning them individually. Is it possible to hack OS X so that it thinks it’s going to a .Mac site, but it’s actually going to a different WebDAV-enabled site? This would be to take advantage of the ease-of-use when putting iLife content online (iWeb, photocasting and podcasts), but not being forced to get a .Mac account. I have a PowerBook G4 LCD screen that I took off from my machine, because the hinges were completely broken. The machine is now headless and serves as a server. I’m wondering if I can somehow turn the now-independent LCD into a secondary display. Simple googling shows that laptop LCDs cannot accept video signals from other machines, but I’m hoping that there is some modification (understandably with some adaptor) that can enable the LCD to serve as an external monitor. |
|
||||