Blogmarks tagged osx
Filters: Type: blogmark × osx × Sorted by date
datasette-bplist (via) It turns out an OS X laptop is positively crammed with SQLite databases, and many of them contain values that are data structures encoded using Apple’s binary plist format. datasette-bplist is my new plugin to help explore those files: it provides a display hook for rendering their contents, and a custom bplist_to_json() SQL function which can be used to extract and query information that is embedded in those values. The README includes tips on how to pull interesting EXIF data out of the SQLite database that sits behind Apple Photos.
How to compile and run the SQLite JSON1 extension on OS X. Thanks, Stack Overflow! I’ve been battling this one for a while—it turns out you can download the SQLite source bundle, compile just the json1.c file using gcc and load that extension in Python’s sqlite3 module (or with Datasette’s --load-extension= option) to gain access to the full suite of SQLite JSON functions—json(), json_extract() etc.
Installing GeoDjango Dependencies with Homebrew. brew update && brew install postgis && brew install gdal
Fun with TextMate and PDB. TextMate bookmarks (against lines in a file) are stored as OS X extended attributes, which can be accessed from Python using the xattr module. Here’s a clever piece of code that uses bookmarks to set breakpoints in the command-line pdb debugger.
Installing PIL on Mac OS X Snow Leopard for use in Google App Engine. PIL installation instructions that actually work... the ’export CC=“gcc -arch i386”’ incantation in particular. Make sure you run setup.py install using the Python version that the App Engine dev tools are using (I ran “sudo /usr/bin/python2.6 setup.py install”).
countdown_to_newyear.py. A quick Python / OS X script I knocked up last night to count in the new year (using the OS X “say” command).
The Tablet. John Gruber further demonstrates his mastery of long-form blogging. It’s reassuring to know that he started putting the notes for this entry together way back on the 24th of September.
10 Uses for Blocks in C/Objective-C. Part of the Cocoa for Scientists series, which is by far the best free Objective-C / Cocoa tutorial I’ve seen anywhere.
MySQL, Python and MacOS X 10.6 (Snow Leopard). I gave up on compiling things when I upgraded to Snow Leopard—I’m back to running Ubuntu in a VMWare instance, mounted over Samba so I can still use TextMate.
homebrew. Exciting alternative to MacPorts for compiling software on OS X—homebrew avoids sudo and defines packages as simple Ruby scripts, shared and distributed using Git.
Mac OS X 10.6 Snow Leopard: the Ars Technica review. The essential review: 23 pages of information-dense but readable goodness. Pretty much everything I know about Mac OS X internals I learnt from reading John Siracusa’s reviews—this one is particularly juice when it gets to Grand Central Dispatch and blocks (aka closures) in C and Objective-C.
How do you install lxml on OS X Leopard without using MacPorts or Fink? I’ve asked on Stack Overflow... hope I get a good answer.
Learning to compile things from source (on Unix/Linux/OSX). I asked on serverfault.com for tips on learning how to solve configure/make/install problems on my own, and got some extremely useful replies.
Install Django, GeoDjango, PostgreSQL and PostGIS on OSX Leopard. This tutorial worked perfectly for me.
MongoDB. Lots of discussions about this at EuroPython today—it’s a document database, very similar to CouchDB but significantly faster and suggested for production use. Best of all, trying it out on OS X is as easy as extracting the tarball and running “bin/mongod --dbpath /tmp/test-mongo-db run”.
Critical Mac OS X Java Vulnerabilities. There’s a five month old Java arbitrary code execution vulnerability which hasn’t yet been patched by Apple. Disable Java applets in your browser until it’s fixed, or random web pages could execute commands on your machine as your user account.
Installing CouchDB from source on OS X. So far I’ve just been playing with it in an Ubuntu virtual machine.
Apple shows us DRM’s true colors. The EFF reviews the various places that Apple still applies DRM (including locking iPhones to carriers, licensing authentication chips for iPod accessory vendors, preventing OS X from loading on generic PCs) and concludes that “the majority of these DRM efforts do not have even an arguable relation to ’piracy.’”
How to install lxml python module on mac os 10.5 (leopard). Instructions that work! Finally, I can find out what all the fuss is about.
sfical.py. Neat idea: write a CGI script that turns a proprietary API (in this case the SalesForce events API) in to standard ical format, then run it on your Mac’s local Apache server and subscribe to it from iCal.
Camouflage. My other key piece of OS X presenting software—hides all of the icons on the desktop (no need to drag them all in to an “Archive” folder every time I give talk).
Caffeine. I’ve been using this for several months and I love it: it’s a simple OS X menu bar icon that lets you prevent your Mac from dimming the screen, going to sleep or starting a screen saver. Perfect for giving presentations and watching Flash movies full screen.
Making Time Machine work with the ReadyNAS. Finally, a decent set of instructions on using a ReadyNAS with Time Machine. The trick is to create a local sparse disk image with a magic name (based on hostname and eth0 MAC address), then move it to the NAS.
iTimeMachine. Enables Time Machine to see network drives (a ReadyNAS NV+ for example). There’s also a defaults setting but it didn’t seem to work; this did.
MacHeist Bundle. Everything’s now unlocked, meaning you can pick up TaskPaper, CSSEdit, Snapz Pro X (excellent for screencasts) and Pixelmator for $49.
Hacky holidays on OS X. Jeremy Keith documents how to get PHP 5 and Apache 2 virtual hosts running on Leopard.
Fluid. Another site-specific browser toolkit for OS X (Leopard only), from Todd Ditchendorf. Again, it’s not clear if this does the Right Thing and creates separate cookie jars for every application.
BBC iPlayer now supports streaming Flash for Mac and Linux. Absolutely fantastic—it Just Works, you hit the homepage and you can be watching video in seconds. No need to even sign up for an account. I imagine IP ranges are used to block access from outside the UK.
HTML5 Media Support in WebKit. WebKit continues to lead the pack when it comes to trying out new HTML5 proposals. The new audio and video elements make embedding media easy, and provide a neat listener API for hooking in to “playback ended” events.
Using Time Machine across the network (via) Haven’t tried this tip yet, but apparently “defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1” lets Time Machine back up to a network drive.