sitepoint.com sitepoint.com

PHP String Handling Functions

PHP has a vast selection of built-in string handling functions that allow you to easily manipulate strings in almost any possible way. However, learning all these functions, remembering what they do, and when they might come in handy can be a bit daunting, especially for new developers. There is no way I can cover every string function in one article, and besides, that is what the PHP manual is for! But what I will do is show how to...

fexpr

Preface to Homer

But of the tree of the knowledge of good and euill, thou ſhalt not eate of it: for in the day that thou eateſt thereof, thou ſhalt ſurely die. — Genesis 2:17 (King James Version)I'm going to suggest a hypothesis on the evolution of societies, natural languages, and memetic organisms.  Relating human language and human thought to programming is a straightforward exercise left to the student. Eric Havelock in his magnum opus...

andre.arko.net andre.arko.net

Repeated headers and Ruby web servers

A few weeks ago, I ran into an interesting problem with my Rails app. For some reason, the request.remote_ip value inside my app didn’t contain the correct value. Instead, it simply contained the internal address of the EC2 instance I was using as a load balancer. I started noticing the problem when I set up a stack consisting of stunnel, HAProxy, Nginx, and Passenger. After a huge amount of testing (and checking a lot of headers), I...

elbeno.com elbeno.com

Merry Xmas

This year it was a fairly quiet affair, seeing as we’d already visited family in late summer and at Thanksgiving. The kids did well as usual. Mini-Elbeno got a Kindle Fire from the grandparents (and has been bound not to buy anything on it without the express permission and help of Mrs Elbeno or myself). Micro-Elbeno is apparently going to grow up to be a typographer because he loves letters so much. He got various alphabetic...