Skip to content

Instantly share code, notes, and snippets.

@millar
millar / iframe-code.html
Last active August 22, 2016 14:58
Chew iframe embed code
<style>
#chew-embed {
width: 100%;
display: inline-block;
position: relative;
}
#chew-embed:after{
padding-top: 56.25%;
display: block;
content: "";
<?php
namespace OAuth\Common\Storage;
use Predis\Client as Predis;
class LaravelRedisStorage extends Redis implements TokenStorageInterface {
public function __construct()
{
@millar
millar / queue.php
Created July 22, 2015 15:24
Disable local queues config
<?php
// app/config/local/queue.php
return array(
// 'default' => 'iron',
// 'default' => 'sync', // Use syncronous for testing without and internet connection...
'connections' => array(
@millar
millar / test.json
Created August 28, 2013 08:36
Provenance bundle in PROV-JSON.
{
"wasAttributedTo": {
"_:id4": {
"prov:entity": "alice:bundle2",
"prov:agent": "ex:Alice"
},
"_:id2": {
"prov:entity": "bob:bundle1",
"prov:agent": "ex:Bob"
@millar
millar / py2neo_test.py
Last active December 20, 2015 23:08
Test used to compare performance of py2neo 1.6 vs 1.5
# coding: utf8
import logging
import unittest
import random
from py2neo import cypher, neo4j
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.addHandler(logging.StreamHandler())