Skip to content

Instantly share code, notes, and snippets.

View Potherca's full-sized avatar
🤔
I wonder what this button does…

Ben Peachey Potherca

🤔
I wonder what this button does…
View GitHub Profile
@Potherca
Potherca / dabblet.css
Created August 22, 2013 14:16
Nested pseudo elements
/**
* 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 September 26, 2013 12:40
A "deeper" indented text effect with the :before and :after pseudo-elements.
/**
* A "deeper" indented text effect with the :before and :after pseudo-elements.
*/
html, body {
height: 100%;
}
body {
margin: 0;
@Potherca
Potherca / dabblet.css
Created September 26, 2013 13:34
Adaptation of "How to vertically and horizontally center text in an unordered list or div"
/**
* 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 October 10, 2016 03:31
Popular Coding Convention in PHP on Github - Shortlist

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 December 24, 2015 19:49
Abstract for the PHPHOOLIGANS Talk

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 December 25, 2015 05:09
My views on a Tweet by JayTaph
@Potherca
Potherca / dabblet.css
Last active January 25, 2021 15:01
CSS Only Warning Sign
@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 December 25, 2015 13:09
CSS Only Warning Sign
@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 July 7, 2022 16:22
A basic qUnit test example

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 January 16, 2014 16:00
Simple Silex implementation to return a 418 HTTP Response. For testing purposes, obviously.
<?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);
}