For everyone's entertainment I though it might be nice to get PHP added to the [Popular Coding Convention on Github][3] site.
A request [had already been made][1] so I decided to [pick up the gauntlet][2].
My plan of attack is as follows:
/** | |
* Nested pseudo elements | |
* | |
* According to [the spec](http://www.w3.org/TR/css3-content/#nesting) pseudo should be allowed to be nested. | |
*/ | |
* {padding:1em;} | |
div { | |
content: 'A'; |
/** | |
* A "deeper" indented text effect with the :before and :after pseudo-elements. | |
*/ | |
html, body { | |
height: 100%; | |
} | |
body { | |
margin: 0; |
/** | |
* Adaptation of "How to vertically and horizontally center text in an unordered list or div" | |
* by Andy Howard | |
* | |
* Please visit the original article at: | |
* http://www.andy-howard.com/verticalAndHorizontalAlignment/index.html | |
* | |
* This version removes some of the unneeded HTML and CSS | |
*/ |
The goal of this talk is to get people thinking and talking more about common practices, instead of copy/pasting or cargo-culting.
This is done through the PHPHOOLIGANS format:
First the audience is presented with several rather opinionated viewpoints by means of provocative statements on things that occur in everyday PHP development, like: working with objects, type safe comparison and type hinting, Design Patterns, and PHP Frameworks. We call these "fights".
Next the PHPHOOLIGANS (Ben Peachey and Auke van Slooten) will engage the audience in an open discussion on these topics. This is done by challenging the audience to (individually or collectively) try to change the hooligans view on a subject. They are effectively told to "pick a fight".
The hooligans will try to defend their viewpoint through valid arguments and anecdotal evidence.
You can see the result of this gist at on Blocks at http://bl.ocks.org/potherca/6922342
@charset "UTF-8" | |
@import url(http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono); | |
/** | |
* CSS Only Warning Sign | |
* | |
* Live preview available at: http://dabblet.com/gist/6937981 | |
* | |
* A lot of website use an icon of a warning sign to display next to important | |
* text. |
@charset "UTF-8" | |
@import url(http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono); | |
/** | |
* CSS Only Warning Sign | |
* | |
* In an attempt to create this effect utilizing the Unicode "Warning Sign" character | |
* I quickly ran into trouble trying to get things cross-browser compatible. Something | |
* else that bothered me was the fact that there was no way to change the look of the | |
* sign, as that was implemented in the used font. In this attempt, the exclamation mark |
This gist contains the minimum needed to run qUnit tests and a example of the most common features you will want to get aquanted with when you start writing tests.
It is viewable online at http://bl.ocks.org/potherca/7946371
<?php | |
$app = new MySilexApplication(); | |
$app->match('/api/coffee/', | |
function() use ($app){ | |
$statusCode = 418; | |
$response = array('status' => 'ok', 'code' => $statusCode, 'message' => 'The HTCPCP Server is a teapot. The responding entity MAY be short and stout.'); | |
return $app->json((object) $response, $statusCode); | |
} |