How to allow nginx to reverse proxy socket.io connections

We have just been setting up nginx as a reverse proxy for a node server. Everything worked fine except the socket.io connections weren’t making it through. You make a reverse proxy with: However to make nginx (version 1.3.13 +) reverse proxy socket.io you should add change your configuration to: I learnt this from Chris Lea’s … Read more

How to setup Python Twitter Tools

I’m just playing around with Python Twitter Tools but given that I am new to Python, I can’t work out to set it up. Step 1: Download and unzip the files from: https://github.com/sixohsix/twitter Step 3: Install python-pip on your computer which is a tool for installiing Python software: apt-get install python-pip Step 4: Browse the … Read more

How to change the font size of SyntaxHighlighter

I’ve just installed SyntaxHighlighter on this blog to style the code snippets. The default font-size was too large for the website. They don’t seem to have any documention or setting to adjust the font-size. The solution is to add some custom css to your theme style:

How to pipe Apache logs to a python script

I wanted to pipe the output of my Apache’s error logs to a Python script. To do this you need to set the a CustomLog directive in your Apache Config. Edit /etc/apache2/sites-available/default and add the following line: To read the input into Python you need to setup a non-blocking read from stdin. Obviously, this script … Read more