Jul
20
2010
xiao
If you just picked up a generic OBD-II – USB interface on eBay and have a Mac, it is true that it is generally more convenient to access these hardware on Windows. Even embedded device developers tend to use Windows to develop against these generic FT232R chip based USB-UART devices simply because of more available supports. But worry not, it can be done on Mac (really on Linux with a more open-platform framework than Windows), it’s just a bit more complicated since it tends to come in be open-source source code rather than prepackaged self-sufficient binaries. Continue reading
no comments | tags: embedded, linux, Mac, MacPorts, OBD, Python, serial, UART, USB, wxPython, X11 | posted in Tips
Jul
20
2010
xiao
I asked this question on Superuser.com after experiencing this problem. Now it’s accessible to everyone.
When something goes wrong and you run out of memory on Mac OS X, the system puts your existing applications to pause to prevent the system from becoming unstable. After taking care of the problem and freeing more memory, you might notice that the applications you had are still frozen. To unpause them, find their PID using ps and use the kill command to revive it (irony)
kill -CONT 111
Of course, 111 here is replaced with the PID you found with ps
no comments | tags: bash, freeze, kill, Mac, Mac OS X, process, ps, terminal, unfreeze, zsh | posted in Tips
Apr
28
2010
xiao
The interweb seem to incline on py2app when it come to deploying applications on mac. I’ve tried to make a single deployable .app file for my application for a long time trying to follow these instructions from ars technica. I’m not a hacker and just want to produce a deployable usable application for others to use. And it seems py2app from MacPorts wasn’t able to surmount the Snow Leopard’s 64-bit compatibility issue.
And then, I was slacking off while studying for my final and out of nowhere I found PyInstaller‘s explicit support for PyQt and its recent support for the mac. And after trying, almost everything works out without much of a kink. Credit goes to ChrisWayg who produced an amazingly complete and up-to-date set of instructions to follow. I’m merely telling how my application did using his instructions (April 2010) and hopefully doing my part to draw more attention to the excellent PyInstaller. Continue reading
no comments | tags: Apple, application, Deployment, Mac, PIL, py2app, PyInstaller, PyQt, Python, Qt, Snow Leopard | posted in Tips
Apr
1
2010
xiao
I bought a new hard drive. My Windows setup already had extensive amount of software and configurations on it that I didn’t want to remake. It worked well, which was rare, so I wanted to keep it.
Winclone is an excellent free tool that lets you do just that! Unfortunately there wasn’t much confirmation on the inter-web that it has been done with Snow Leopard and Windows 7 64-bit. So I tried just that and it worked flawlessly! Continue reading
no comments | tags: Apple, Bootcamp, drive, Mac, Microsoft, migrate, partition, Windows 7 | posted in Tips
Dec
8
2009
xiao
Notes to self because I never remember
To arpspoof, turn on IP forwarding:
echo 1 > /proc/sys/net/ipv4/ip_forward
with Linux (might need su) or more permanently,
in /etc/sysctl.conf
Continue reading
no comments | tags: arp, arpspoof, bsd, forwarding, hack, ip, linux, Mac, spoofing, tcpkill, tcpnice | posted in Tips
Nov
29
2009
xiao
Spooler simply stops every time you try to print or add a printer or something? You can keep restarting it but will never be able to print something? I won’t pretend to know your problem since it depends on potentially so many things but if you have a MacBook, one thing worth investigating is have you been running VMWare Fusion? The ThinPrint drivers of the VMWare Tools seem to be able to cause this problem when you run the same machine in BootCamp mode. Unfortunately, you can’t just uninstall it. Uninstalling VMWare Tools from inside virtual mode seems to solve this problem
no comments | tags: Bootcamp, Fusion, Mac, Macbook, print, spooler, ThinPrint, tools, VMWare, Windows | posted in Tips
Nov
14
2009
xiao
There are some 64-bit related issues when using PyQt and Snow Leopard. There’s the way to resolve it by reverting to 32-bits:
- Get the latest versions of PyQt and SIP. You need Qt installed of course.
- Configure SIP using
python configure.py --arch i386
- Configure PyQt using
python configure.py --use-arch=i386
- Finally, make sure your python is running in 32-bit mode because current Qt doesn’t support 64-bit mode. Add
export VERSIONER_PYTHON_PREFER_32_BIT=yes
to your .bash_profile in your home directory
- If your Python still refuses to run in 32 bit mode, try
no comments | tags: 32, 64, i386, Mac, PyQt, Python, Qt, SIP, Snow Leopard | posted in Tips
Apr
19
2009
xiao
This bugged me today so here’s the one line solution
So after applying the Perfect Visor from my previous blog post, this can be even faster to navigate to awkward Mac style directories than remembering the even more awkward Finder key combo to “Go to Folder”
open ~/Library/Logs/CrashReporter/
Because you can tab-complete or to go hidden folders
no comments | tags: Apple, directory, finder, Mac, terminal | posted in Tips
Mar
7
2009
xiao
The Visor Terminal, one of my most used hack-features. This guide helps you put your Mac Terminal to the zenith of usability and convenience.

Visor Terminal
The drop-down Quake-style terminal window is extremely convenient to run commands without disrupting the current workflow. Unfortunately the default install is very messy. It needs an open terminal program running in the background which can’t be closed and takes up valuable Dock space. Continue reading
4 comments | tags: AppleScript, blacktree, command line, hack, Mac, perfect, prompt, quake, SIMBL, terminal, visor | posted in Tips