Tag Archives: OS X

Visualise macports dependencies

to clean up your installed macports and remove cruft you need to uninstall them in the correct order – according to their dependencies. A graphical visualisation might help doing so: Call $ ./port-deps2dot.rb | dot -Tpdf -o port-deps.pdf ; open port-deps.pdf with the ruby script port-deps2dot.rb as follows: #!/usr/bin/ruby -w   # visualize macports dependencies. [...]

TextWrangler + tidy

as I didn’t get TidyService to work correctly with UTF8 umlauts, I created a UNIX Shell Script wrapper for html tidy as it comes with OS X that does the job at least for TextWrangler: open TextWranglers “Unix Filters Folder” create a file named e.g. “Tidy Html.sh”, paste the following lines into the file and [...]

Tooltip: doxygen & graphviz (OS X)

ever seen error messages like this when generating doxygen docs for an iPhone/Mac Objective C project: …/build/doxygen/html/a00136.png’ produced by dot is not a valid PNG! You should either select a different format (DOT_IMAGE_FORMAT in the config file) or install a more recent version of graphviz (1.7+) ? Happened to me this morning when running doxygen [...]

Binary Search NSArray

Though CFArray comes with binary search capability, NSArray does not – at least not within the iPhone SDK. The indexOfObject:inSortedRange:options:usingComparator: can’t be found. Plus the CFArrayBSearchValues doesn’t tell you whether the key actually is part of the list or not. That’s what the Java JDK does, so let’s implement some category methods -(NSInteger)binarySearch:(id)key; -(NSInteger)binarySearch:(id)key usingSelector:(SEL)comparator; [...]

NSDateFormatter case sensitive trap

Though NSDateFormatter behaves slightly different than documented, the following might even be correct, as strange as it might look (mind the last two lines): -(void)testNSDateFormatterTrap { NSDateFormatter *lower = [[[NSDateFormatter alloc] init] autorelease]; lower.dateFormat = @"yyyy-MM-dd HH:mm:SS ZZZ";   NSDateFormatter *upper = [[[NSDateFormatter alloc] init] autorelease]; upper.dateFormat = @"YYYY-MM-dd HH:mm:SS ZZZ";   lower.timeZone = upper.timeZone [...]

Upgrade to Snow Leopard

Mac OS X 10.6 Snow Leopard (partition 25G, HFS+ Journaled, Upper/Lower) Mac OS X 10.5 Leopard (partition 25G, HFS+ Journaled, Upper/Lower) partition userspace 100G, HFS+ Journaled, Upper/Lower $ cat /etc/fstab # mount partition "userspace" as /Users UUID=D016E3FD-E322-3006-A8F5-D2348C6A5B7B /Users hfs rw,auto create user “mig” TimeMachine restore Users + Settings delete user “mig” manually copy user “Shared” [...]

Sane Batch Scan Workaround

Obwohl scanimage aus dem SANE Werkzeugkasten in der (aktuellen?) OS X Version $ scanimage –version scanimage (sane-backends) 1.0.21cvs; backend version 1.0.21 (installiert nach http://blog.mro.name/2008/12/scanner-mustek-1200-cu-unter-mac-os-x-105/) beim Versuch per “batch” mehrere Seiten zu scannen jeweils nach Seite 1 aus der Kurve fliegt: $ scanimage –batch-start=45 –batch-count=16 –batch –batch-prompt \ –format=pnm –mode Color –resolution 300 … Scanning page [...]

iTunes Mediathek aus dem Home Verzeichnis raus

Damit das Home-Verzeichnis meines Macbooks mehr Arbeit und weniger Ballast enthält nehme ich die MP3s raus:

HFS Filesystem Party

Vorgestern Nacht hat – möglicherweise im Zusammenhang mit einem unaufmerksam durchgeführten Java Update – das Filesystem meines Macbooks einen Schuß bekommen. Folge: Die Maschine bootet, bootet, bootet – und schaltet sich kommentarlos aus (sic!). Alles sehr ergonomisch – ohne verwirrende Fehlermeldungen.

Transfer Phone Numbers from gammu to the Mac Adressbook

ok, make yourself comfortable, fasten your seatbelt and stop smoking. This will be quite a journey: