Archiv

Archiv für die Kategorie ‘Tipps und Tricks’

Allowed Characters for Javascript Variables

20. Oktober 2011 Keine Kommentare

I am playing with the JDK Javascript API (JSR 223) and I wanted to check out the replacement of variables in a String. Then I suddenly got this error:

javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: missing ; before statement (<Unknown source>#1) in <Unknown source> at line number 1

After some reseach I found out, that my variables did contain invalid characters in my case the variable contained a -.


So the Regular Expression for valid Javascript variable names is:

[a-zA-Z_$][0-9a-zA-Z_$]*

It is also possible to use any unicode characters for variables, but of course this is not recommended.

Add Path Bookmarks to iTerm

1. August 2011 3 Kommentare

Since I am a developer, I need a terminal very often. I prefer using on my MacOSX System. I use many tabs in iTerm and obviously all terminals point to different locations. I was tired of switching to all relevant locations everytime I start up iTerm. So I decided to give the bookmark feature of iTerm a try.

My goal was to just click on a bookmark and a new tab should appear which has the right folder as default workspace.
Mehr…

KategorienMac OS X, Tipps und Tricks Tags:

Ordnerbilder für Fastgallery Gallerien in Drupal

23. Dezember 2010 Keine Kommentare

Ich nutze seit geraumer Zeit für eine DrupalInstanz Fastgallery um Bildergallerien auf dieser Drupal Webseite zu realisieren. Das Modul ist recht nützlich, wenn man viele Bilder hochladen will, jedoch auf Features wie Kommentare, Bewertungen oder Ähnliches verzichten kann.

Es hat mich jedoch schon immer ein bisschen gestört, dass bei jedem Upgrade das Modul nicht mehr wirklich abwärtskompatibel ist und ich deshalb schon öfter meine Backups einspielen musste weil es mir dann meine Bildergallerien zerschossen hat :)

Ein Feature was ich bei den alten Version spitze fand ist, dass man Bilder als Gallerieordnerbilder verwenden konnte. Ich dachte immer, dass das Feature verschwunden ist, mit ein bisschen mehr Aufwand geht das ganze jedoch doch:
Mehr…

Maven Projekt mit JDK 1.6 kompilieren

4. September 2010 1 Kommentar

Die Standard Compiler Einstellung für Maven ist das JDK 1.4 . Da sogar Java 1.5 das End of Life schon lange erreicht hat, wollen die meisten ihr Projekt wohl mit Java 1.6 kompilieren.

Um Maven dazu zu bringen das JDK 1.6 zum kompilieren, benutzt man einfach das maven-compiler-plugin. Hier ein Beispiel aus meiner pom.xml:

Mehr…

KategorienMaven, Tipps und Tricks Tags:

Secure the Ntop Webinterface

23. März 2010 Keine Kommentare

By default only a few areas of the ntop webinterface have restricted access. To secure the whole ntop webinterface follow these instructions:

  1. Navigate to “Admin -> Configure -> Protect URLs”.
  2. Click “Add URL”.
  3. Leave the field empty and klick “Add URL”

Now your whole webinterface of ntop is secured and only your defined users have access to the webinterface.

KategorienLinux, Tipps und Tricks Tags: ,

Pixture_reloaded CCS Theming

14. März 2010 Keine Kommentare

Today it took me the whole day to check out this small dirty trick:

If you are using the Drupal Theme Pixture Reloaded, all changes in your style.css are not applied automatically. Like every other Drupal Theme, which supports the Colour Module, you have to klick “Save Configuration” in your theme configuration dialog. Only after klicking it, your style.css gets read out. Otherwise your old cached css file is used.

After that i had another problem: My Theme was broken after reading the style.css out. I just had to delete the /sites/default/files/color folder and everything worked fine again.

KategorienDrupal, Tipps und Tricks Tags: , ,

XAMPP: Apache doesn’t start

14. März 2010 Keine Kommentare

If you want to start Apache via XAMPP, but it won’t start, most likely another application listens to port 80. Very often this “problem-application” is Skype. There are two possible approaches:

  1. You start Apache before you start the Skype client.
  2. You deactivate Skypes feature to listen to port 80 and 443. You can do this via the settings dialog. Just uncheck “Use port 80 and 443 as alternatives for incoming connections.

Now everything should be fine.

KategorienTipps und Tricks Tags: , ,