Skip to content

Instantly share code, notes, and snippets.

View bangpound's full-sized avatar

Benjamin Doherty bangpound

View GitHub Profile
@bangpound
bangpound / tattoo.info
Created August 27, 2015 18:28
Drupal 7 tattoo module adds to `Drupal.settings` object the whole JSON representation of all viewed entities.
name = Tattoo
core = 7.x
dependencies[] = restws
@bangpound
bangpound / ClosureCompilerPass.php
Created July 28, 2015 14:05
Symfony closure compiler pass
<?php
namespace DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class ClosureCompilerPass implements CompilerPassInterface
{
private $pass;
@bangpound
bangpound / trace.md
Created July 24, 2015 18:48
Tracing private property values at runtime.
<?php
function init_trace($object)
{
    $r = new ReflectionObject($object);

    // Create array of object's property names.
    $properties = array_map(function (ReflectionProperty $property) {
        return $property->getName();
 }, $r-&gt;getProperties());
@bangpound
bangpound / section7.1.md
Last active August 29, 2015 14:24
jekyll
<?php
<<<CONFIG
packages:
- "fabpot/goutte: ~3.1"
- "symfony/console: ~2.7"
- "symfony/yaml: ~2.7"
CONFIG;
use Goutte\Client;
<?php
<<<CONFIG
packages:
- "guzzlehttp/guzzle: ~6.0"
- "symfony/dom-crawler: ~2.7"
- "symfony/css-selector: ~2.7"
- "symfony/console: ~2.7"
CONFIG;
<?php
class TwigFormatServiceProvider implements \Pimple\ServiceProviderInterface
{
public function register(\Pimple\Container $pimple)
{
$pimple['twig.sandbox.allowed_tags'] = array();
$pimple['twig.sandbox.allowed_filters'] = array();
$pimple['twig.sandbox.allowed_methods'] = array();
$pimple['twig.sandbox.allowed_properties'] = array();
{
"repositories": [
{
"type": "composer",
"url": "http://bangpound.github.io/packages"
}
],
"require": {
"composer/composer": "~1.0@dev",
"composer/installers": "~1.0@dev",
diff --git a/app/index.html b/app/index.html
index 6ae0c13..5616fa4 100644
--- a/app/index.html
+++ b/app/index.html
@@ -12,7 +12,6 @@
<!-- build:css(.) styles/vendor.css -->
<!-- bower:css -->
- <link rel="stylesheet" href="bower_components/jquery-mobile/css/themes/default/jquery.mobile.css" />
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.css" />
diff --git a/app/index.html b/app/index.html
index c63ec15..673e360 100644
--- a/app/index.html
+++ b/app/index.html
@@ -14,6 +14,7 @@
<!-- bower:css -->
<link rel="stylesheet" href="bower_components/jquery-mobile/css/themes/default/jquery.mobile.css" />
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.css" />
+ <link rel="stylesheet" href="bower_components/isteven-angular-multiselect/angular-multi-select.css" />
<!-- endbower -->