Skip to content

Instantly share code, notes, and snippets.

View wouterj's full-sized avatar

Wouter de Jong wouterj

View GitHub Profile
aferrandini/urlizer 1.0.0 Library for urlizer
burgov/key-value-form-bundle 1.3.1 A form type for managing key-value pairs
cocur/slugify 1.4.x-dev 05f00fa Converts a string into a slug.
container-interop/container-interop 1.1.0 Promoting the interoperability of container objects (DIC, SL, etc.)
doctrine/annotations dev-master f25c8aa Docblock Annotations Parser
doctrine/cache dev-master eb8a736 Caching library offering an object-oriented API for many cache backends
doctrine/collections dev-master 866e100 Collections Abstraction library
doctrine/common dev-master 69e04b3 Common Library for Doctrine projects
doctrine/data-fixtures dev-master a02f0e7 Data Fixtures for all Doctrine Object Managers
doctrine/dbal 2.4.x-dev 4845507 Database Abstraction Layer
<?php
require 'vendor/autoload.php';
$dom = new DOMDocument();
$dom->loadHTML(<<<EOH
<!doctype html>
<td>
<div class="iaconbox">
<a title="magnet">Hello!</a>
testwork:
testers:
strict: true
@wouterj
wouterj / security.php
Last active September 27, 2015 09:30
<?php
$authenticator = new AuthenticationProviderManager([
new DaoAuthenticationProvider(
new InMemoryUserProvider([
'wouter' => ['password' => 'test', 'roles' => ['ROLE_USER']]
]),
new UserChecker(),
'cli',
new EncoderFactory([
<?php
// ...
class MyController extends Controller
{
/**
* @Route("/", name="neuro_index")
*/
public function indexAction()
@wouterj
wouterj / README.md
Last active August 29, 2015 14:21 — forked from weaverryan/README.md
Welcome to the Symfony Documentation Hack Day May 23rd, 2015

It's Documentation Hack Day!

Welcome! No matter what you're level of Symfony or how you feel about your English (I'm sure it's just fine), we have plenty of things we need help with! This document will guide you through everything:

Where Are we Meeting?

We're meeting on Freenode in the #symfony-docs channel. Come hang out!

What Can I Work On?

@wouterj
wouterj / 1-life.php
Last active August 29, 2015 14:21
Game of Life
<?php
function life($i){foreach($i as$j=>$a)foreach($a as$k=>$b){$l=array_sum([($r=!!@$i[$x=$y=$j-1])&&$i[$x][$k],($R=!!@$i[$y+=2])&&$i[$y][$k],($u=$i[$j])&&($c=isset($u[$z=$k-1]))&&$u[$z],$c&&$r&&$i[$x][$z],$c&&$R&&$i[$y][$z],($C=isset($u[$z+=2]))&&$u[$z],$C&&$r&&$i[$x][$z],$C&&$R&&$i[$y][$z]]);$o[$j][$k]=$b?(!($l<2||$l>3)):($l==3);}return$o;}
->then(function ($n) {
$options = array();
foreach ($n as $name => $value) {
if ('type' === $name) {
continue;
}
$options[$name] = $n[$name];
unset($n[$name]);
data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iNDE3cHgiIGhlaWdodD0iMzAwcHgiIHZpZXdCb3g9IjAgMCA0MTcgMzAwIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA0MTcgMzAwIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnIGlkPSJMYXllcl8xXzFfIj4NCgk8ZyBpZD0ib3V0bGluZV8xXyI+DQoJCTxwYXRoIGZpbGw9IiNCNUI1QjYiIGQ9Ik0yNzUuOSwxNDVjMCwxOC4yLTE0Ljc5OSwzMy0zMywzM0gxMjAuNzAxbC0zNi4zLDQybC0wLjMtNDJINDBjLTE4LjIsMC0zMy0xNC44LTMzLTMzVjQ0DQoJCQljMC0xOC4yLDE0LjgtMzMsMzMtMzNoMjAyLjljMTguMTk5LDAsMzMsMTQuOCwzMywzM1YxNDVMMjc1LjksMTQ1eiIvPg0KCTwvZz4NCgk8ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3ICAgICI+DQoJCT
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.