Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am robknight on github.
  • I am rjknight (https://keybase.io/rjknight) on keybase.
  • I have a public key ASCKQInQucNRK7niQ1gdMfEb46mubVWuq6G1-P7QqJ_miwo

To claim this, I am signing this object:

swagger: "2.0"
info:
version: 1.0.0
title: Content Availability
host: web-test.store.bbc.com
basePath: '/store-api/v1'
schemes:
- https
consumes:
- application/json
[8] #default> class MyClass { function say($words, $times) { for ($i = 0; $i < $times; $i++) { echo $words . "\n"; } } }
[9] #default> $x = new MyClass;
// object(MyClass)(
//
// )
[10] #default> $y = array($x, 'say');
// array(
// 0 => object(MyClass)(
//
// ),
drupal git:8.x ❯ ohcount ✭
Examining 12716 file(s)
Ohloh Line Count Summary
Language Files Code Comment Comment % Blank Total
---------------- ----- --------- --------- --------- --------- ---------
php 6941 461918 315268 40.6% 111138 888324
javascript 460 58479 14818 20.2% 9902 83199
css 132 13830 1873 11.9% 1163 16866
@robknight
robknight / gist:9601194
Created March 17, 2014 15:19
Drush via Composer in Puppet
composer::project {'drush':
project_name => 'drush/drush',
target_dir => '/opt/drush',
version => 'dev-master'
}
file {'/usr/bin/drush':
ensure => 'link',
target => '/opt/drush/drush'
}
@robknight
robknight / gist:8441515
Created January 15, 2014 18:22
Calling test-parser results in out of memory error. Reducing the number of elements in the string does get it to work.
(ns parser.testing
(:require [instaparse.core :as insta]))
(def textparse
(insta/parser
"S = (Content)*
Content = (ContentLine)*
ContentLine = (Word | Whitespace)+ LineEnd?
<Word> = #'\\S+'
<Whitespace> = #'\\s*'
@robknight
robknight / gist:5430280
Created April 21, 2013 17:05
Crash when using docker
[ 102.806583] aufs 3.5-20120827
[ 102.825695] device vethXeCmA5 entered promiscuous mode
[ 102.839361] IPv6: ADDRCONF(NETDEV_UP): vethXeCmA5: link is not ready
[ 102.850706] IPv6: ADDRCONF(NETDEV_CHANGE): vethXeCmA5: link becomes ready
[ 102.867874] docker0: port 1(vethXeCmA5) entered forwarding state
[ 102.869316] docker0: port 1(vethXeCmA5) entered forwarding state
[ 102.889670] init: Failed to spawn ufw pre-start process: unable to execute: No such file or directory
[ 102.899006] init: Failed to spawn ufw post-stop process: unable to execute: No such file or directory
[ 102.925584] init: Failed to spawn ufw pre-start process: unable to execute: No such file or directory
[ 102.955173] init: Failed to spawn ufw post-stop process: unable to execute: No such file or directory