Blog Archives

Enable native NTFS read/write support in Snow Leopard

Snow Leopard has the ability to mount NTFS volumes as read/write, but it’s not enabled by default. Here’s how to get full read/write support for NTFS drives in Snow Leopard : In Terminal, type┬ádiskutil info /Volumes/volume_name, where┬ávolume_name is the name

Tagged with: , ,
Posted in Apple

Perl vs Python

EXTERIOR: DAGOBAH–DAY With Yoda strapped to his back, Luke climbs up one of the many thick vines that grow in the swamp until he reaches the Dagobah statistics lab. Panting heavily, he continues his exercises–grepping, installing new packages, logging in

Tagged with: , ,
Posted in Code

Building netrek vanilla 2.16 for MacTrek

Ever since OS X 10.5 came out, the embedded netrek server in MacTrek simply quit. I never got a good fix for that, which is why MacTrek 1.5 no longer supports a local server. At least that way a player

Tagged with: ,
Posted in Code

Taming Snow Leopard: CGDisplaySwitchToMode deprecation

Last one.. (i hope) here’s a snippet that will flick the screen in a best match resolution using only 10.6 API. – (void) setDisplay:(CGDirectDisplayID) dspy toMode: (struct screenMode) screenMode { CGDisplayModeRef mode; CGDisplayErr err; CGDisplayModeRef originalMode = CGDisplayCopyDisplayMode(kCGDirectMainDisplay); if (

Tagged with: ,
Posted in Code

Taming Snow Leopard: CGDisplayBestModeForParameters deprecation

We used to have a cool function that would give us the best match for a given resolution, it’s deprecated so let’s work around it. Again Apple failed to provide a documented example so here is one: struct screenMode {

Tagged with: ,
Posted in Code

Taming Snow Leopard: CGDisplayBitsPerPixel deprecation

This one is tricky, since Apple does not provide you with an alternative API. There is one hidden in the header files however, replace: .. bitsPerPixel = CGDisplayBitsPerPixel(CGMainDisplayID()); .. with: — (size_t) displayBitsPerPixel:(CGDirectDisplayID) displayId { CGDisplayModeRef mode = CGDisplayCopyDisplayMode(displayId); size_t

Tagged with: ,
Posted in Apple, Code

Taming Snow Leopard: stringWithCString: length depreciation

I know this one has been depreciated in 10.5 to but i never found a nice replacement until now: message = [NSString stringWithCString:(buffer + 4) length:(arg2 -5)]; becomes: message = [[[NSString alloc] initWithBytes:(buffer + 4) length:(arg2 -5) encoding:NSASCIIStringEncoding] autorelease];

Tagged with: , ,
Posted in Code
Categories