Archive for the ‘PHP’ Category

Aptana Studio 3 Snippets For The Singleton Pattern

Tuesday, November 6th, 2012

So it seems my old eclipse templates won’t work anymore in Aptana Studio 3.... Read More

Xmodmap for quick PHP programming in Linux

Tuesday, September 25th, 2012

When I program Clojure and PicoLisp I use Emacs and it’s the way things are done in Emacs which inspired me to looking into making myself more productive doing PHP in Eclipse.... Read More

Mercurial revision history search with PHP

Wednesday, August 8th, 2012

Hgview is a fantastic tool but for some reason the search field refused to come up in my version no matter how much CTRL+F I tried.... Read More

Dynamic Eclipse PDT (PHP) templates for the singleton pattern

Sunday, September 25th, 2011

I’m currently working with a legacy PHP CMS and do-it-all system which is heavily reliant on singletons. Instead of relying on static methods and direct invocation we store object instances in a global array, these instances are then retrieved through the use of a call looking like this: singleton(’ClassName’).... Read More

How to parse and tokenize a complete PHP project

Sunday, September 25th, 2011

Yesterday I had to loop through every directory in a whole PHP project and go through all the PHP files in order to get at their contents, the goal was to get information from each file in order to create an array looking like this for each class method:... Read More

MySQL replication in PHP - on the same machine

Wednesday, September 14th, 2011

I just realized I needed to replicate some data from one database to another, but only certain tables.... Read More

PHP color scheme

Saturday, July 9th, 2011

Color theming in Geany is quite a no-brainer if you know how to go about it.... Read More

Unzip on Ubuntu, the mess it makes with UTF-8 and the PHP fix

Wednesday, June 22nd, 2011

Create a file called “2 clés.html”, zip it up and, name the file html.zip then unzip it with the following command: unzip html.zip -d /tmp, check the /tmp folder, what do you see?... Read More

PHP email admin script

Friday, June 17th, 2011

If you’ve read the article about my email server setup you quickly realize that adding a new email account is quite onerous, a combination of adding records to tables in a MySQL database and creating folders on the harddrive. This can easily be automated with for instance PHP and I’ll show you how below.... Read More

PHP and setlocale - getting more locales than English to work

Monday, February 21st, 2011

Update I’ve had to revise this one, the original post might work (or not) if you have an older install of Ubuntu, atm (2013-02) I use Lucid, and now the following process works:... Read More