Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
$ find /path/to -type d -exec chmod 775 {} \; | |
$ find /path/to -type f -exec chmod 664 {} \; |
$ find /path/to -type d -exec chmod 775 {} \; | |
$ find /path/to -type f -exec chmod 664 {} \; |
db.coll.group({ key: {}, initial: {csum: 0}, reduce: function(obj,prev){ prev.csum += obj.field;}}); |
/*! | |
* jQuery Data+ - v0.1pre - 6/3/2011 | |
* http://benalman.com/ | |
* | |
* Copyright (c) 2011 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. | |
* http://benalman.com/about/license/ | |
*/ | |
(function($) { |
var image = $(document.createElement("img")) | |
.height("100px") | |
.width("100px") | |
.hide() | |
.load(function () { // show image only if it is loaded ok | |
$(this).show(); | |
}); | |
// box is some div having background image (which serves as default if image above is not loaded) | |
box.append(image); |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
class Polygon { | |
/** | |
* @var array | |
*/ | |
protected $polygon = []; | |
/** | |
* Polygon itself, with basic vector-based structure |
<?php | |
define('ZF2_PATH', realpath(__DIR__ . '/../vendor/ZendFramework/library')); |
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="Application" default="build" basedir="../"> | |
<target name="build" depends="prepare,phpunit,phpmd,phpcpd,phpdoc,phpcb,phpdcd,phploc,phpcs"/> | |
<property name="applicationDir" value="${basedir}/source" /> | |
<property name="buildDir" value="${basedir}/build" /> | |
<target name="prepare"> | |
<mkdir dir="${buildDir}/logs" /> |
The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.
You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.