Skip to main content

Creating JSONP(adding) responses with Silex

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· One min read
Stephan Hochdörfer
Head of IT Business Operations

Recently I had the need to extend a Silex application to be able to return JSONP responses when needed. I was looking for a generic approach and came across a blog post by Raphael Stolt who solved the problem with a clever "after middleware". This is the code you need to add to your app.php file:

Environment Dependent Sencha Touch Config

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 2 min read
Stephan Hochdörfer
Head of IT Business Operations

Recently we developed a mobile application based on Sencha Touch and Cordova. The application was communicating with a REST backend. Since I did not want to change the URL to the REST backend manually when deploying the app in the testing or production environment, I was looking for a way to use multiple configuration files based on the active environment.

Extending .jshintrc configurations

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· One min read
Stephan Hochdörfer
Head of IT Business Operations

Since version 2.5.1 of jshint it is possible to extend your own .jshintrc configuration from another .jshintrc config file. This allows you to extend a common configuration and add project specific options (e.g. custom global variable names) to a local configuration file. This way you do not end up with the pain of keeping multiple configurations in sync. It's fairly trivial to use. In your .jshintrc configuration file add an extends field which points to the configuration you are extending from:

Running PHPUnit via Phing on HHVM

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 2 min read
Stephan Hochdörfer
Head of IT Business Operations

For quite some time we run the unit tests for our libs and tools against PHP and HHVM, at least that is what I thought up to now. As it turns out I missed a minor detail. In our Jenkins job we invoke the Phing task like this:

Archiving Emails in Thunderbird

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 2 min read
Stephan Hochdörfer
Head of IT Business Operations

For years, I am struggling to find a decent way of archiving / exporting my business mails stored in my IMAP account. Manually copying 10K+ mails is no fun, and addons like the ImportExportTools did also not work properly. So it was clear to to me that I needed to backup the mails on our mailserver and import them somehow into my local Thunderbird instance. The problem to solve was that we use the MailDir format to store the mails on the server side and the ImportExportTools is only able to import mails in mbox format. Thanks to Google I was able to find a one-liner for the conversion, pretty clever if you ask me (at least compared the complex bash and Python scripts I found):

Configuring Xdebug and phpstorm for CLI debugging

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 2 min read
Stephan Hochdörfer
Head of IT Business Operations

Current situation: I have no local webserver running and just php5-cli (plus a few extensions) installed as most of the development I do will make use of a Vagrant machine. From time to time I develop small tools or libs which I like to debug on the command line. This is an overview how I configured my Ubuntu 14.04 box to handle debugging with Xdebug and phpstorm.