Can I lose my need to impress?


If weakness is a wound that no one wants to speak of
Then “cool” is just how far we have to fall
I am not immune, I only want to be loved
But I feel safe behind the firewall

Can I lose my need to impress?
If you want the truth I need to confess

I’m not alright, I’m broken inside
And all I go through, it leads me to You

-Sanctus Real

HTTP headers and raw POST data for PHP-CGI

I host my website on Dreamhost and as good value as it is, with great email/SVN/MySQL and hosting, there are some limitations. One of them is trying to read raw POST data from $HTTP_RAW_POST_DATA and the other is trying to read custom HTTP headers because PHP runs as a CGI module using there service.

I realised the working around for getting raw post data is to use:

$data = file_get_contents(‘php://input’);

And that you can use mod_rewrite to to pass HTTP headers to the $_SERVER variable, as described here. If you want to add additional header values, you must specify each one as a seperate E= statement in your .htaccess file. I was writing a CALDAV server and wanted to be able to (1) use the HTTP authentication described here, (2) read the “Depth” HTTP header, and (3) redirect all requests queries through a single php file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [E=REDIRECT_REMOTE_USER:%{HTTP:Authorization},E=DEPTH:%{HTTP:Depth},L]
RewriteRule .* – [E=REDIRECT_REMOTE_USER:%{HTTP:Authorization},E=DEPTH:%{HTTP:Depth},L]

Mail.app RSS Smart Mailbox

If like me you have quite a lot of RSS subscriptions within Apple Mail.app you may find that you either get sick of navigating each RSS folder on the left individually but don’t want to put all your RSS subscriptions within your inbox. What I realised you could do is create a smart mailbox to only show read RSS items, greatly saving space in the left hand pane, and making it easy to navigate all unread subscriptions.

iSync icon after iTunes sync

For some of you this maybe so minor its not worth worrying about, but I really don’t like how if conflict resolver is shown when syncing my iPhone with iTunes, the iSync icon gets added to my menu bar no matter whether I click sync now or later after resolving the conflict. I’ve contacted Apple about this, but I recently found this article (http://www.tuaw.com/2009/11/02/mac-101-how-to-manually-enable-menu-extras/) that helps explain how to load menu items. What I’ve done instead is rename the sync menu item, so that it never gets loaded. Quick disclaimer, I’m not responsible for any damage to your computer using this command.

sudo mv “/System/Library/CoreServices/Menu Extras/Sync.menu” “/System/Library/CoreServices/Menu Extras/Sync2.menu”

Dismantle.Repair.


Oh oh, things are gonna change now for the better
Oh oh, things are gonna change

Hands, like secrets, are the hardest thing to keep from you
Lines and phrases, like knives, your words can cut me through
Dismantle me down (repair)
You dismantle me
You dismantle me

 

iPhone Idea

My friend Janakan just got a Google Andriod. I think they’re pretty cool along with the Palm Pre and iPhone. Abduction on Google Android is great :-P

Anyway one thing the iPhone could improve is adding a central notifications area to show all push notifications. The way I’d see this working is to swipe right from the home screen to where spotlight/search is now, and show a chronological list of all notifications for all apps. Then if you start typing it starts to search your iPhone as usual.

US$150 Off Dreamhost Promo Code

I use the excellent Dreamhost webhosting service to host my webpage. Its use by my church and some other companies I work closely with and it has seriously good performance / features for the price.

I have 5 special promo codes that expire on the 16th of October. They get you $150 off signing up for 5 years or $200 off 10 years! 5 years might seem like a lot, but its a seriously good service, and they have a 97 day complete money back guarantee, so if you don’t like it you can leave. Normally the maximum is $97!!!

When you sign up here https://signup.dreamhost.com/ use one of the following promo codes, let me know if one doesn’t work and I’ll take it off the list.
027454987515
255736220221
976239709269
197256262936
970929354547