20090429
Stripping trailing whitespace from XCode
Firstly, my usual approach of s/\s+$//g doesn't work since it eats up the newline too. s/\s+$/\n/g doesn't work either because the Replace: field in the find dialogue doesn't escape the \n.
Final solution is as shown: s/[ \t]+$//g
Cheers,
Steve
Labels: code, computer, howto, osx, software
20080920
A relatively pain free Linux/OS X VNC setup
Ever since I got my 2nd monitor, I been using VNC to work on my laptop. Leopard's inbuilt VNC server isn't really VNC compliant, and has many issues when used with a normal VNC client. I have found Vine server to be an excellent replacement. The client side is a little interesting. RealVNC didn't work too well for me, in that often the screen would stop responding, or it would not receive key events. The best setup I have found is to use tightvnc with the following Vine server settings:
- Devices
- Keyboard Layout: US
- Keyboard Events: User Session Events
The client and server will happily share the clipboard if you enable it. Settings are accessed via F8 in the client, and via Preferences in the server. The client is smart enough to synchronise clipboards only when it loses focus - which would be you switching away to say, paste a url into firefox. All in all it is a fairly painless experience.
Cheers,Steve
Labels: computer, howto, linux, oss, osx, software
20080215
Allow only virtual users to login to proftpd
Locate the AuthOrder line in your proftpd.conf and change it to:
AuthOrder mod_auth_file.c
Cheers,
Steve