rss

Nginx always overwrites the Server-Header

When I was configuring the nodejs server behind nginx, I experienced the issue that nginx always overwrote the Server header response.

This is a bit annoying, since I want to know what version of spludo runs on my site.

The solution is not to set

1
server_tokens off

since that would only disable the version number.

The solution is:

1
proxy_pass_header Server;
In node.JS, Spludo & NGINX By DracoBlue @ 22:08 19.06.2011

Facebook Client for node.js 1.3.0

Today I have an update for the Facebook Client for node.js finished.

The version 1.3.0 is a graph and rest api client for facebook. It has support for the latest stable nodejs 0.4.x.

Now it's possible to post data (for instance into your news feed):

1
2
3
4
5
6
7
8
facebook_session.graphCall(
"/me/feed", {
"message":"I love node.js!"
},
'POST'
)(function(result) {
console.log('The new feed post id is: ' + result.id);
});

All you need to do is to specify the method parameter (defaults to GET).

Thanks to jharlap for this addition.

Also thanks to tslater and shaisultanov. They found an issue with expires-time (which is fixed now) and requested the brand new FacebookSession#isValid method, which tells you if the session is really alive.

Source may be found at node-facebook-client@github.

The package is also available by using npm:

1
$ npm install facebook-client

Installing php 5.3.5/5.3.6 on Ubuntu Maverick/Lucid

Latest Version for PHP 5.3 on Ubuntu is just PHP 5.3.3. This is not so good, if you want to have some of the plenty bugfixes which will be shipped with a later version.

If you want to upgrade to 5.3.5 (5.3.6 support may come later), you can use this inofficial ppa by the nginx user at launchpad: https://launchpad.net/~nginx/+archive/php5.

For ubuntu maverick just create a file:

1
$ gedit /etc/apt/sources.list.d/php5-ppa.list

with the contents

1
2
3
deb http://ppa.launchpad.net/nginx/php5/ubuntu maverick main
deb-src http://ppa.launchpad.net/nginx/php5/ubuntu maverick main

and run:

1
2
$ sudo apt-get update
$ sudo apt-get dist-upgrade

Now you have php-5.3.5 installed on your ubuntu box! Have fun.

In Linux, php & Ubuntu By DracoBlue @ 22:02 13.04.2011

Custom identity file (id_rsa.pub) with git client

Whenever you want to use a custom identity file with ssh, you usually use the -i parameter.

1
$ ssh -i ~/.ssh/other_id_rsa myuser@example.org

This will validate against ~/.ssh/other_id_rsa.pub and not the default one at ~/.ssh/id_rsa.pub.

If you want to use this with the default git client, it won't work. You cannot specify the identity file when cloning/pulling from or pushing to a repository, yet.

So:

1
2
$ git remote add origin ssh://myuser@example.org:repository.git
$ git pull origin master

will fail, because it's using the default rsa key at ~/.ssh/id_rsa.

Instead you can use this workaround.

Adjust your ~/.ssh/config and add:

1
2
3
4
Host example
Hostname example.com
User myuser
IdentityFile ~/.ssh/other_id_rsa

Now use the ssh host alias as your repository:

1
2
$ git remote add origin example:repository.git
$ pull origin master

And it should use the other_id_rsa-key!

In Linux & ssh By DracoBlue @ 22:26 20.03.2011

Send GoogleMails from another address without "on behalf of"

de en

There was a blogpost on gmailblog a while back, which explained how to use a own smtp server to avoid the "on behalf of" message in clients like Outlook.

The cool thing, this does not only work, if you have a custom smtp-server! I tried to add smtp.gmail.com as custom server: the "on behalf of" was gone!

In Articles & Google Mail By DracoBlue @ 19:58 24.01.2011

PhpDebugToolbar 1.3.0 (for agavi) released

Today I am pleased to announce the new version 1.3.0 of the Agavi PHP DebugToolbar for download.

New features include full propel support (thanks tim), rows+time+memory display for the database queries and some small bugfixes.

The source can be found on github now http://github.com/DracoBlue/PhpDebugToolbar, feel free to fork it and send pull request with new features!

Download for PhpDebugToolbar 1.3.0 (just 23KB) is also available here at dracoblue.net.

Short installation and configuration information can be found in the readme. Thanks to all contributors!