Posts

Showing posts from 2009

procmail and .forward

The facts are these: I have a user account (and therefore mailbox) on a unix box (let's call it Acorn) behind Xcorp's corporate firewall. I want all mail received for my account on Acorn to be forwarded to another, external, email address. I used to achieve this quite simply by creating a ".forward" file in my home directory on Acorn. This contained one line: \my_username, me@anotherhost.com which saved a copy of my mail locally and also sent it to my remote email address. XCorp's network policy meant that Acorn couldn't communicate directly to the outside world; instead, all email was sent out via the company's smtp relay. This system worked well for a good while -- right up until a couple of weeks ago when XCorp's sys-admins tightened up their relay's policy. It now refused to relay any messages where the sender's email address (as given in the 'From' header) was not from the xcorp.com domain. This meant that about 80% of the emails

Setting XCode brace options

Just started working with Xcode. I'm old-fashioned and prefer my code blocks to look like this: if (x) { //do something } rather than like this (which is how Xcode defaults to doing things): if (x) { //do something } After a bit of quality time with the big G, I found that this bit of Voodoo (supplied to the Terminal) does the trick: defaults write com.apple.Xcode XCCodeSenseFormattingOptions -dict BlockSeparator "\n" More of these codes are available from Apple's reference docs .

Google's new buttons on Safari

I like cocoa-style buttons in Safari on the mac and wasn't happy with Google's decision to change them to a unified (and ugly) cross-platform look. As my HCI teacher used to say all those years ago: if people wanted cross-platform controls they'd all use the same OS. However, you can specify a custom css stylesheet in Safari, and with far too much trial-and-error I worked out that the following seems to make the buttons behave properly again: div.ds, span.ds { border: none !important; } div.lsbb { width: 70px; text-align: center; padding-top: 5px; } div.tsf-p table { border: none !important; } .lsb { /* for Google homepage */ -webkit-appearance: push-button !important; border: 2px outset buttonface !important; background: rgb(192,192,192) !important; -webkit-border-bottom-left-radius: 0 !important; -webkit-border-bottom-right-radius: 0 !important; -webkit-border-top-left-radius: 0 !important; -webkit-border-top-right-radius: 0 !important; font-size: 24px !im