We have interesting code samples such as capturing video intercepting DirectX[2] and hooking into SQL Server to abort unsecure (e.g. injection attacks) queries[3].
1. http://www.nektra.com/products/deviare-api-hook-windows/devi...
2. http://blog.nektra.com/main/2013/07/23/instrumenting-direct3...
3. http://blog.nektra.com/main/2013/06/26/sql-server-intercepti...
I found an old copy of MobileSubstrate that has partial support for i386 and x86_64 (which works fine on Linux since the ABI is the same as Mac). I found out that it doesn't support all the possible jumps in the overwritten area. I've been slowly patching and improving it[0] but I'd rather be spending my time hooking stuff than writing the hooker.
In the meantime have you tried to ask these kind of questions in http://reverseengineering.stackexchange.com/