Tag Archives: OS X

install ruby @ OS X

OS X comes with a pretty hung ruby (1.8.7) until ‚Mavericks‘. ruby 1.8.7 had it’s planned EOL long ago, even debian/stable nowadays comes with a newer one. So if you’re still running Mountain Lion or older, you may need to install ruby. I chose rbenv and here’s how I did: RTFM install rbenv: $ brew […]

Processing + OpenCV

http://ubaa.net/shared/processing/opencv/ http://ubaa.net/shared/processing/opencv/download/opencv-framework.1.1.dmg ? http://ubaa.net/shared/processing/opencv/download/opencv_01.zip http://ubaa.net/shared/processing/opencv/download/opencv_examples.zip

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$ ./port-deps2dot.rb | dot -Tpdf -o port-deps.pdf ; open port-deps.pdf with the ruby script port-deps2dot.rb […]

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$ cat /etc/fstab # mount partition "userspace" as /Users UUID=D016E3FD-E322-3006-A8F5-D2348C6A5B7B /Users hfs rw,auto create user „mig“ […]

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$ 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 \ […]

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: