development blog for the wicked stuff we encounter

I've recently found out on my Mac, that nslookup will be obsolete; and we need to use dig instead of this well known tool. If you want to install it on Fedora, just type:
apt-get install bind-utils

I have some Mac OS Xs around me (Intel and PPC ones as well), and usually I find the opportunity to create a nice kernel panic :] But I always forget how to list the already loaded kernel extensions:

kextstat

To load a kernel extension, type:

kextload /System/Library/SomeCool.kext

to unload a kext, type:

kextunload /System/Library/SomeCool.kext

If you want to replace any kexts, just simply copy over as root (i usually do it in midnight commander) and after say:

chmod -R 755 /System/Library/Extensions/SomeCool.kext chown -R root:wheel /System/Library/Extensions/SomeCool.kext

and clear the kernel cache:

kextcache -k /System/Library/Extensions/

I needed to work with a MySql server which was behind a firewall, and only the port for SSH was open. Of course, in this case, I need to use the portforward feature:ssh example.com -l myusername -L:3306:localhost:3306 However, if I type 'localhost' in MySql Query Browser, it tries to connect via socket - of course which is not avaliable. I tried my local IP and the outer one (I'm behind NAT), but nothing worked... then came the idea: use localhost's IP address! So in the connection window, I typed: 127.0.0.1, and voila, the window opened listing all tables...:)