Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
Working, working, working...

Ben Peachey Potherca

👨‍💻
Working, working, working...
View GitHub Profile
@Potherca
Potherca / dabblet.css
Created Aug 22, 2013
Nested pseudo elements
View dabblet.css
/**
* 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';
@Potherca
Potherca / dabblet.css
Created Sep 26, 2013
A "deeper" indented text effect with the :before and :after pseudo-elements.
View dabblet.css
/**
* A "deeper" indented text effect with the :before and :after pseudo-elements.
*/
html, body {
height: 100%;
}
body {
margin: 0;
@Potherca
Potherca / dabblet.css
Created Sep 26, 2013
Adaptation of "How to vertically and horizontally center text in an unordered list or div"
View dabblet.css
/**
* 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
*/
@Potherca
Potherca / introduction.md
Last active Oct 10, 2016
Popular Coding Convention in PHP on Github - Shortlist
View introduction.md

Popular Coding Convention in PHP on Github

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:

@Potherca
Potherca / abstract.md
Last active Dec 24, 2015
Abstract for the PHPHOOLIGANS Talk
View abstract.md

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.

@Potherca
Potherca / bl.ocks.org
Last active Dec 25, 2015
My views on a Tweet by JayTaph
View bl.ocks.org
@Potherca
Potherca / dabblet.css
Last active Mar 8, 2020
CSS Only Warning Sign
View dabblet.css
@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.
@Potherca
Potherca / dabblet.css
Last active Dec 25, 2015
CSS Only Warning Sign
View dabblet.css
@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
@Potherca
Potherca / README.md
Last active Nov 14, 2018
A basic qUnit test example
View README.md

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

@Potherca
Potherca / silex-teapot-response.php
Created Jan 16, 2014
Simple Silex implementation to return a 418 HTTP Response. For testing purposes, obviously.
View silex-teapot-response.php
<?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);
}
You can’t perform that action at this time.