Syndicate content

A solution to PHP's new namespace separator moaning

 - Tagged as

I've been quite busy lately but I've obviously been exposed to all the fud about the PHP internals decission of choosing the back-slash as the namespace separator.

So to keep everyone happy I've spent a few minutes working on a solution to the problem and here it goes:Read more

A really simple Include filter for Drupal

 - Tagged as

I've been using Texy! lately to write in my Drupal powered blog, it's a great Markdown/Textile replacement and it even has a syntax highlighting addon which helps a lot to publish source code in the posts.

I've found however a problem. I usually keep my source files in my subversion repository and sometimes I want to show the syntax highlighted code of one of those files in the post. I was getting tired to copy-pasting the contents so I've implemented a dead simple Drupal input filter which dynamically includes a local or remote file as simple text in the content.Read more

Tags emulation for Zend_Cache

 - Tagged as

Managing a cache is a complex task, at first you start placing random stuff on it, when you need to squeeze a few more hits per second you keep adding stuff to the cache. At the end of the day, if you've not planned it carefully, you might end up with a nightmare of stale data in your pages or even a completely broken site.

One easy way to apply some logic to the cached data and help in the invalidation of cached stuff is the use of tags. Cache tags are a simple way to group cached items so it gets easy to remove/invalidate them if needed.Read more

RISON, a compact JSON specially suited for URIs

 - Tagged as

I was looking for a way to efficiently pass data between cross-domain iframes using the location hash trick. The first thing that I checked was JSON but the payload gets huge when url encoded, then I tried with base64 encoding which helps but not very much. Finally I found RISON which in short is nothing more than a reformulation of JSON's control characters to make them more URI friendly.Read more

Nokia's N810 on the mail

 - Tagged as

After being trying to get an iphone for a couple of months and haven't succeed at it, I sat down and did an extensive research on the market offerings for my needs. Finally I found what I needed and to my surprise it wasn't the phone with the Apple logo.Read more