Archive for category Tools

Xampp 1.7 / Xampp 1.8 activate Ldap

Posted by on Tuesday, 21 August, 2012

Those xampp bulids need a little tweaking:

to get php with ldap to run you need to remove the comment in the file php\php.ini:

extension=php_ldap.dll

Next you need to copy the file  php\libsasl.dll to apache\bin\libsasl.dll

 

Checkliste Grafik-Design fürs Web

Posted by on Sunday, 19 June, 2011

Seit über einer Dekade arbeite ich im Web-Bereich. Immer wieder hatte ich mit Grafiker zu tun die gut für den Print-Bereich ausgebildet und erfahren waren. Aber leider sind nicht alle Grafiker auch erfahren im Web-Bereich und nicht alles Wissen aus dem Print ist direkt anwendbar. In einem größeren Projekt ist dieser Guideline entstanden das recht viele Web-Fragen beantwortet.

@todo: translate to english

 

Guidelines für Design im Web

Farbraum RGB
Auflösung 72 DPI
Hintergrund Transparent bei allen Grafiken
Farbprofile schaden nicht, aber die wenigsten Monitore sind kalibriert, jeder Monitor wird Farbabweichungen haben
Maße Für Schriften, Abstände, Höhen Breiten:  Pixel sind der kleinste gemeinsame Nenner, im Web ist die Größenangabe EM üblich, die in Relation zur Standard-Schriftgröße des Browsers steht, dh abweichen kann (Schätzung: 1 EM = 16 Pixel im IE, andere Broser können sich anders verhalten).

 

Bildschirmauflösungen 1024 * 768: Bildschirmauflösung, nicht verfügbare Pixel  (verfügbare Pixel im GUTFALL ca 995 * 580, bei eingeblendenten Toolbars weniger als 580)

1280 * 1024 und 1920 * 1080 ebenso.

Best Practice: Beim Start des Design einen Screenshot mit einer Bildschirmauflösung 1024 bzw 1280 machen (am eigenen Bildschirm umstellen) und in diesem Framework designen. Darin festlegen ob Content breiter wird, wo Weißräume auftauchen, was Mindest- und Maximalbreiten sind. Diese dokumentieren.

 

Wiederkehrende Elemente Menues, Banner, Icons:  müssen immer die gleiche Breite haben. Diese werden im CMS einmal gemacht und wiederholt auf die Seiten „kopiert“. Genauso Bilder für einen „Slot“ (zb rechter Bereich mit Bild) immer exakt die gleichen Maße. Wiederkehrende Elemente idealerweise nur 1 mal designen und dann so importieren das sie von mehreren Seitenlayouts verwendet werden. Faustregel: Es wird Änderungen geben.

 

Icons In Pixeln, Vektorgrafiken sind unbrauchbar. Alle Icons einer Familie müssen die gleichen Größen und Ausrichtung haben. Transparenz um Icons ist gut. Verläufe auf Transparenz (zB um Buchstaben) müssen auf einzelne Pixel genau gearbeitet werden. Da im Web kein Alpha-Kanal verfügbar ist (Ausnahme PNG 24, da ist aber die Unterstützung schlecht) bleiben nur Halbtöne die in Richtung Hintergrundfarbe gehen.

 

Schriften Es gibt kein Antialiasing im Web. Schriftgrößen und Abstände in Pixeln. Am Client sind nur Standard-Schriften verfügbar, bei  Spezialschriften gibt es noch keine brauchbare Lösung die überall funktioniert

Demo-Page mit Schriften: Alle Überschriften und Textblöcke auf einer Seite zusammenstellen und Formatierungen dort festlegen und dokumentieren

 

Texte Mindest- und Maximallängen für Text festlegen – dabei muss man sehr flexibel sein da der Content über Jahre von unterschiedlich geschulten Autoren eingegeben wird.

Andere Sprachen haben bei gleichem Text andere Textlängen. Oft sind das bedeutende Unterschiede. Russisch zB ist bei gleichem Content mindestens 20 % länger.

Nicht alle Sprachen werden von links nach rechts geschrieben. Arabisch oder chinesisch wird von Rechts nach Links geschrieben.

 

PSDs
  • Komplexe Elemente in Folder legen und sprechend benennen
  • Textebenen nicht rendern
  • Hilfslinien sind gut
  • Farbpaletten benutzen um Abweichungen zu vermeiden

 

Grafiken fürs Web
  • GIF: optimal für Buttons / Grafiken mit wenigen Farben.  Benutzt eine Palette mit maximal 255 Farben, eine „Farbe“ davon kann transparent sein
    • Bei Reduktion der Palette ist genau auf die Farben zu achten, Photoshop versucht intelligent die Farben zu wählen, verfälscht aber dabei die Farben. Händisch die Company-Farben prüfen

 

  • JPG: optimal für Fotos und Grafiken mit Verläufen
    • Handoptimierung der Größe per Slider. Wenn die Komprimierung zu groß ist entstehen hässliche Artifakte

 

  • PNG8:  Ähnlich zu verwenden wie Gif, gleiche Problemfelder bei Reduktion der Palette. Erfahrungsgemäß bei gleicher Qualität mehr Speicherverbrauch als GIF
  • PNG24: analog zu JPG, hat aber zusätzlich einen vollen Alpha-Kanal. Dh transparente Verläufe sind möglich. Allerdings noch nicht in allen Browsern unterstützt, dh noch nicht verwendbar

 

Es kommt unvermeidlich zu Farbabweichungen zwischen unterschiedlichen Clients. Nur die allerwenigsten Monitore sind kalibriert. Kontraste und Farbtemperatur sind ebenfalls  abweichend.

 

If you rather drive your html guy screaming mad follow this article: 20 things to drive web developers crazy

Pipe a SVN Dump (or any other big file) trough an SSH tunnel

Posted by on Wednesday, 24 November, 2010

Now this is cool:

svnadmin dump /var/oforge/svn/speedTest/  | ssh tinifax@collab.kuplen.at “cat > /tinifax/tmp/speedtest.oforge.dmp”

Streams a big file (in fact any standard out) trough an ssh tunnel to another server

Running an ADMIN shell in windows 7 / windows 2008

Posted by on Thursday, 21 October, 2010

It’s good not everything is done as admin in the newer windows versions, but some things are just a pain to do if you do not have a admin shell. But there is a way

Hit the Windows button and type cmd (nothing new here). But now enter CTL + SHIFT + ENTER confirm to run it as admin and you have your root shell

Apache: send data from reverse Proxy to Application Server

Posted by on Monday, 18 October, 2010

It’s possible to send data from the reverse proxy to the server doing the work using HTTP Headers. This includes information if HTTPS is used (only the front server knows that) or geoIP information.

Example Apache conf

<Location /eParcel>
# tells if we are running http or https s
RequestHeader set X-Forwarded-HTTPS “%{HTTPS}s”
<Location>

ProxyPass /tintifax http://example.com/tintifax/
ProxyPassReverse /tintifax http://example.com/tintifax/

Curl and NTLM

Posted by on Wednesday, 13 October, 2010

Yes, we can use CURL to talk to a Sharepoint server and retrieve a document:

curl –ntlm -u username:password http://server/my/personal/tintifax/Shared%20Documents/10MBrandom.doc > example.log/

HTTP Uploads larger than 2 GB

Posted by on Tuesday, 28 September, 2010

Do not work – I ran into a problem trying to make the upload size for one of my application bigger. Firefox, Internet Exporer and Safari all failed. The reason: they mess up the headers – Content-Length does an overflow

POST /uploadtest.php HTTP/1.1
User-Agent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; )
Content-Type multipart/form-data; boundary=---------------------------7da301630063a
Accept-Encoding gzip, deflate
Content-Length -156552375
Pragma no-cache

A simple PDO example

Posted by on Monday, 27 September, 2010


// create PDO Database connection
try {
$dbh = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpass);
} catch(PDOException $e) {
echo $e->getMessage();
throw($e);
}
// prepare the statemant
$sql = $dbh->prepare("
SELECT
city, count(city), sum(counter) cnt
from geoip
where
country_name = :countryname
group by city;
");
// replace the bind parameters with variables
$sql->bindParam(':countryname', $countryname, PDO::PARAM_STR);
// execute the statemant
$sql->execute();
// check for errors - PDO catches them silently
if ($sql->errorCode() != '0000' ) {
$msg = $sql->errorInfo();
throw new Exception($msg[2]);
}
// iterate over the results
foreach ($sql as $row) {
echo "access via index: " . $row[0] . "\n";
echo "access via associative array: " . $row["cnt"] . "\n";
}

Oracle 10 Client on Windows 7

Posted by on Tuesday, 17 August, 2010

If you need the full Oracle Client on your Win7 machine, you are in a bit of trouble.

Windows 7 is internal windows 6.1 and the setup routine checks for windows 5, 5.someting and 6.0. So no Windows 7.

But there is a hack: turn off the system check with the flag -ignoreSysPrereqs

so running

setup.exe -ignoreSysPrereqs

form a cmd does the trick. You’ll have to overwrite the error later in the setup routine by clicking the failed checkbox.

mysql: removing a timestamps on update CURRENT_TIMESTAMP

Posted by on Monday, 2 August, 2010

Situation: you have a table and a timestamp in it. Thee is a on update CURRENT_TIMESTAMP on the column. But you want to get rid of it:

ALTER TABLE yourTable
CHANGE  someCol somecol TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP