Leben++

It's never too late to get a life!

jEdit Syntax highlighting for Asterisk AEL files

These days I'm doing some Asterisk work, creating AEL dial plan scripts for call center agents: Logging in and out, checking if the hotlines are staffed before allowing a pause, logging agent events to a separate logfile. For the scripts I'm using my favourite cross-platform editor jEdit. At the moment, jEdit has no syntax highlighting for AEL files, so I put one together myself. For a while, the file was hosted on snippets.dzone.com but since I improved on it, I'd rather host it on GitHub for easier download and modification.

Pádraic Brady kündigt neue HTML-Filter-Bibliothek für PHP 5.3 an.

Was tun, wenn der Kunde auf einen WYSIWYG Editor für die Benutzereingaben besteht? Der leidgeprüfte Webentwickler denkt hier sofort an das, was nicht nur für Fox Mulder gilt: "Vertraue niemandem!" Von Benutzern eingegebenes HTML zerschießt das schöne Layout oder enthält sogar <script>-Tags und präparierte Bilder, die Malware auf dem Rechner des nichtsahneden Besuchers installieren. Also greift er zu strip_tags und ein paar regulären Ausdrücken und das Unheil nimmt seinen Lauf. Denn strip_tags und reguläre Ausdrücke können einfach nicht die gesamte Bandbreite an Boshaftigkeit des Internet filtern.

Visually debugging XSL-FO stylesheets

When developing XSL-FO stylesheets sooner or later you will see something that doesn't look as intended: It has the wrong margin, padding, line height, floats in the wrong place, etc. If you have no visual debugging tool, the quickest way to check for errors is setting a border or background attribute on the element in question.

Export your database schema for a PHPUnit database test case

The PHPUnit database test case allows to create before- and after-states of your database in XML or CSV files. Writing those files can be tedious if you need to describe your complete database schema from scratch and its not a very DRY approach. Fortunately the PHPUnit classes for XML files have methods to persist the database schema. I have written a small shell script for generating the PHPUnit XML schema files from an existing database.

Der obligatorische erste Eintrag

Und wieder hat das Web ein Blog mehr. Doch dieses Blog wird die RSS-Reader dieser Welt nicht mit Content zuballern, sondern nur sporadisch den einen oder anderen Artikel über Programmierthemen veröffentlichen.

Das Blog startet so minimalistisch wie möglich. Eine Suche und Kategorienübersicht lohnen sich erst, wenn es mehr Inhalte gibt. Wer Features vermisst, der darf in die Kommentare schreiben.

Viel Spaß!

Inhalt abgleichen