Ich mag cheat sheets aka Spickzettel. Ich selbst hab immer einen für Prototype und YUI an der Wand hinter dem Monitor. Manchmal weiss man nicht mehr genau wie die Funktion oder Eigenschaft XY heisst. Man kann natürlich dann kurz in Google nachschlagen, aber viel einfacher ist eine Liste mit allen wichtigen Dingen zur Hand zu haben.
Scott Klarr hat einen Blogeintrag zusammengestellt wo so ziemlich alle wichtigen cheat sheets rund um PHP zum Download bereit stehen.
Mit dabei auch spezielle für Wordpress, Smarty, CakePHP und Drupal.
http://www.scottklarr.com/topic/100/php-cheat-sheets/
Thanks Scott!
Interessant sind auch seine weiteren Sammlungen für CSS, MySQL und XML/XSLT.
Justin Palmer hat ein Snippet für Prototype gepostet welches das Date Object um strftime() erweitert.
-
Object.extend(Date.prototype, {
-
strftime: function(format) {
-
var day = this.getDay(), month = this.getMonth();
-
var hours = this.getHours(), minutes = this.getMinutes();
-
function pad(num) { return num.toPaddedString(2); };
-
-
return format.gsub(/\%([aAbBcdHImMpSwyY])/, function(part) {
-
switch(part[1]) {
-
case 'a': return $w("Sun Mon Tue Wed Thu Fri Sat")[day]; break;
-
case 'A': return $w("Sunday Monday Tuesday Wednesday Thursday Friday Saturday")[day]; break;
-
case 'b': return $w("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")[month]; break;
-
case 'B': return $w("January February March April May June July August September October November December")[month]; break;
-
case 'c': return this.toString(); break;
-
case 'd': return pad(this.getDate()); break;
-
case 'H': return pad(hours); break;
-
case 'I': return pad((hours + 12) % 12); break;
-
case 'm': return pad(month + 1); break;
-
case 'M': return pad(minutes); break;
-
case 'p': return hours> 12 ? 'PM' : 'AM'; break;
-
case 'S': return pad(this.getSeconds()); break;
-
case 'w': return day; break;
-
case 'y': return pad(this.getFullYear() % 100); break;
-
case 'Y': return this.getFullYear().toString(); break;
-
}
-
}.bind(this));
-
}
-
});
[via Justin Palmer]
Schön gelöst. Weitere ähnliche Schnippsel von ihm gibt es im GitHub.

