How I like to code

Category Archives: Tip

Finding the “file in use” culprit in Mac OS X

Thank to a tip at MacWorld, I was able to find out what process was locking a file I wanted to delete. lsof | grep [whatever]

OmniGraffle supports UNIX keyboard commands

Well, at least ctrl+a and ctrl+e. I haven’t tried anything else, but I was surprised to find out that these even work within OmniGraffle.

Enabling PHP5 on Mac OS X

Thanks to for this tutorial!

Thank you

I had to install Windows 7 on my test mac-mini computer and was halted by the “Boot Camp x64 is unsupported on this computer model” message. Thanks to Michael Anastasiou , things are now working as they should.

Command Prompt

Ah-ha! I found this nice little feature in the “Command Prompt” in Windows 7: hit the F7 key and you get a window with a history of commands you typed into the window. Nifty!

Detecting clang or llvm in Xcode 4.2

Use either __clang__ or __llvm__ defines. More information can be found at stackoverflow

DOS HERE and opening a command prompt in Windows 7

In Windows XP, Microsoft released PowerToys with a DOSHERE tool that allowed you to open a command prompt in the current window you had open. In Windows 7, you can hold down the shift key while right clicking a folder to get the same functionality… Cool! Thanks to windows7hacker for the tip!

iPad 2 doesn’t appear in iTunes

For some strange unknown reason, my iPad was not showing up under the devices section of iTunes after I upgraded to iOS 5. After much Google’ing, the only information I found helpful had me delete iTunes and reinstall it… which actually worked: How to remove and reinstall the Apple Mobile Device Service on Mac OS […]

List open files

On the Mac OS, if you need to know what files are open and by what application and on what disk, you can use the lsof command in Terminal. Pair that command with grep and you can isolate things like this: ?View Code BASHlsof | grep "Snow Leopard" This will show you what files are […]

Important command to demangle C++ code in your pasteboard

Cool command line I can run from DTerm on the contents in my clipboard, outputted from Xcode: ?View Code BASHpbpaste | c++filt | mate This command will take my clipboard contents, which were originally created from Xcode, pass that to the c++filt command and then create a new file in TextMate with the resulting contents.