Archiv für die Kategorie „Software“

Custom color-schemes in PsPad editor

Montag, 17. Mai 2010

PsPad is a quite famous file editor for Windows. If you’re developing on a netbook or laptop you might want to consider switching to a dark color scheme. This increases the battery lifetime and is an easy action to save energy in general. You can change the color settings for programming languages separately in the Settings menu of PsPad. Click on Highlighter Settings... and choose the desired settings.

You can also save your setings or load pre-made settings from an .INI file.

I have set-up a little subversion repository and uploaded my PsPad color settings if you want to give it a try.
Since I mainly work with CSS, (X)HTML, PHP, XML XSL(T) and plain text files, other languages might not be pretty.

Download

Download my INI file here: PsPad Dark Syntax Highlighting Scheme.

Instructions

1. Download the INI file.
2. Save it to :\Program Files\PsPad editor\Colors
3. Load the setting in the Syntax Highlighter Settings.

Weblication und passwortgeschütze Verzeichnisse

Mittwoch, 5. Mai 2010

Ein Beispiel: Man hat eine CMS-Installation auf die Entwickler und der Kunde Zugriff haben und möchte sicherstellen dass die Seiten nicht von Suchmaschinen-Bots indiziert werden und unerwartet Besucherströme herbeilotsen, die die Seite noch nicht sehen dürfen. In der Regel tut es eine einfache .htaccess-Authentifizierung mit Benutzern und Passwörtern.
Es sei denn: man hat ein Verzeichnis mit Passwortschutz in welchem man die Möglichkeit braucht, HTTP-Requests auszuführen (z.B. wenn man mit PHP’s Output Buffering arbeitet, Gegenargumente mal Beiseite gelassen).

Um Weblication in einem geschütztem Verzeichnis zu betreiben benötigt man also zunächst einen regulären .htaccess-Verzeichnisschutz. Die .htaccess könnte zB. so aussehen:

AuthUserFile /var/www/html/.htpasswd
AuthName "Login"
AuthType Basic
require valid-user

(in der .htpasswd hat man entsprechend Benutzer und kodierte Passwörter angelegt)

Nun wird die Benutzerauthentifizierung mit einer “deny all, allow from”-Anweisung gekapselt, die der lokalen IP (und/oder dem Domainnamen) des Servers freie Bahn läßt. In der Regel dürfte der Eintrag localhost oder die IP (127.0.0.1) funktionieren (, was aber bei spezielleren Konfigurationen auch abweichen kann). Die letzte Zeile satisfy any zeigt an, dass entweder die IP/Domain oder die Authentifizierung erfüllt sein muss.

deny from all
allow from 127.0.0.1
allow from .contactsheet.de
AuthUserFile /var/www/html/.htpasswd
AuthName "Login"
AuthType Basic
require valid-user
satisfy any

DaDaBIK Revised

Montag, 8. März 2010

DaDaBik is a “Database Interfaces Kreator”, which helps you building web-interfaces to a database easily. It has been developed by Eugenio Tacchini. Since this is a rather old, yet working, piece of software, no wonder there’s a lot of PHP4 involved :O

I did a redesign of the template in late 2009 and took some time this weekend to get it polished up a bit. What I like about DaDaBIK is that you can provide data editing functionality and are able to adjust the look to a clients CI quickly (just replace one logo and change some colours - the PSD is included).

  • Insert data
  • Login
  • Listing

Although the code of DaDaBIK is from another pre-PHP5-decade, I didn’t see much of a need to change the inner workings of DaDaBIK. So what I did is putting some fresh paint on it using CSS. Since there is no template-engine imlemented into DaDaBik, I had to edit core files here and there for simple markup changes. So! The only thing that makes sense is to offer one complete package here: DaDaBik itself and the new design included.

Installation:
If you’re about to use DaDaBIK for the first time, you might want to take a look at www.dadabik.org as well, since there’s a documentation online giving you more insight. Anyways, the setup is quite easy:

  1. Download the archive
  2. Extract the files, and upload the dadabik folder to your server.
  3. Edit the file includes/config.php and enter your DB settings according to your setup.
  4. Open up the URL yourdomain.com/pathtodadabik/install.php.
  5. DaDaBIK will now set up some internal tables and you’re done.
  6. DaDaBIKs default username is root and the password is letizia

Notes:
It’s important that you have created the database, you entered in the config.php file first. (for example using phpmyadmin).
If you want to, you can use a pre-made MySQL table structure with some dummy entries that I have included in the zip: just copy and paste the contents of dadabik-example-db.sql into the SQL window of the new database in phpmyadmin.

Once you’re done with the basic installation, head over to the admin.php which gives you all the admin options you need to include/remove secific tables and set human readable aliases for the tables.

The last step to perfect interfaces is to click the Interface configurator link on that admin page.
The configurator gives you all the options to customize the appearance, set default values, define which fields are mandatory, etc. etc.

Demo:
Check out the demo of DaDaBIK with the new design.
You’ll have to enter username test and password: test@ddbdemo to enter.
(please keep in mind that a lot of features are disabled in the demo, since the test-user doesn’t have admin-rights.)

Download:
DaDaBIK Revised 1.0 (1MB, tar.gz)

Subversion Repository:
There is a Subversion repository in case you want to make use of the open source idea or really want to see some old school PHP4 :O

Changelog:
2010-03-09 initial release of DaDaBIK Revised

Browser Updates

Dienstag, 26. Mai 2009

Google hat vergangenen Donnertag verlauten lassen, dass die Javascript-Engine V8 in Chrome verbessert wurde. Zusammen mit der neuesten WebKit-Version würden einige Webseiten nun bis zu 30% schneller laden. In der Meldung hiess es auch, dass die Updates automatisch in Chrome installiert würden - wobei ich da etwas anderes festgestellt habe.

Erwartet hätte ich eigentlich das Aufploppen eines Hinweises sobald es eine neuere Version von Chrome gibt. Dem ist aber nicht so. Wer ein bißchen sucht findet stattdessen im Menüpunkt ‘Google Chrome anpassen’ den unscheinbaren Punkt ‘Infos zu Google Chrome’. Öffnet man dieses Fenster findet man dort einen Update-Button. Bei mir brachte das einen Versionssprung von v1.0.154.65 auf die aktuelle v2.0.172.28. (via BuilderAU)

Ein Browser um den es jetzt lange ruhig war ist Flock, der nun ebenfalls in einer neuen Version verfügbar ist. Zur Freude aller Socialnetworking Addicts (wenn ich mich recht entsinne war das schon immer der Fokus von Flock: das Social Web) hat man in die neueste Version als logische Erweiterung eine Twitter-Anbindung in den Browser integriert. Ebenfalls neu: ein Facebook Chat mit seinen Buddies. Könnte man sich mal ansehen…

Xubuntu und Eclipse

Sonntag, 24. Mai 2009

Installiert man Eclipse in seiner brandneuen Xubuntu 9.04 (Jaunty) Installation staunt man beim starten dieser nicht schlecht: da hat mein ein Paket mit einer uralten Version 3.2 geschnürt (aus dem Jahre 2006). Einen Grund dafür gibts wohl auch: ein nicht behobener Bug in Eclipse. Nur leider keine Lösung - zwar gibt es einen Patch, der "für einige funktionieren könnte…".
Stop. Ich will nicht rumexperimentieren und fixen. Eclipse ist Standardsoftware. Man sollte anscheinend gar nicht erst mit solch exotischen Derivaten Zeit vertrödeln.
Das mal so notiert, während die Ubuntu CD noch brennt.