CakePHP: Simple Google Analytics integration

The easiest way to integrate Google Analytics’ JavaScript tracking code in your cake application is to add Google’s code snippet in the file app/views/default.ctp. To be a little more flexible you can store the tracker code in the application’s configuration file (/app/config/core.php). Moreover you can define a CakePHP (view) element that can be reused in […]

Read more…

ActionScript 2: Create dynamic FLVPlaybacks with attachMovie

There is a simple way in ActionScript 2 to dynamically create instances of the FLVPlayback component: Put the FLVPlayback component into your library (you can drag’n’drop the component from the components window into the library). Use the following two lines of code to attach the FLVPlayback to a MovieClip (_root in the simple example) and […]

Read more…

Ubuntu: Fix slow ssh logins

Slow SSH logins could be caused by DNS lookup on the server side. If it takes (too) long time to be prompted for a password the option UseDNS could by a solution (as suggested in the OpenSSH FAQ). On Ubuntu edit the file /etc/ssh/sshd_config and add the following line: UseDNS noUseDNS no Restart the SSH […]

Read more…

mediaboxAdvanced 1.1.7: German black and white themes

Introduction mediaboxAdvanced is a library based on MooTools to create overlays on the current page. The library supports various kind of media like images, videos, external pages…. Since I used mediaboxAdvanced in a german project I localized the default white and black theme that are provided by the author. Localization contains the following adaptations: Button […]

Read more…

Apache’s mod_rewrite & mod_proxy: Use “Reverse Proxy Request Headers” for rewrite rules

Imagine the following scenario: The URL to your site is your-public-url.com (hosted in a low-priced web package that only supports reroutings to other URLs). The “internal” URL to your site is your-internal-url.com (e.g. an DynDNS-URL to your home server). The hoster of your-public-url.com uses apache’s mod_proxy that acts in a reverse proxy mode to redirect […]

Read more…