Skip to content

Instantly share code, notes, and snippets.

View ollietb's full-sized avatar

Ollie Harridge ollietb

View GitHub Profile
[{
"ImageUrl" : "https://cdn.cnn.com/cnnnext/dam/assets/191029095147-taylor-swift-and-selena-gomez-exlarge-169.jpg",
"FaceDetails": [
{
"BoundingBox": {
"Width": 0.146373450756073,
"Height": 0.320313960313797,
"Left": 0.24110157787799835,
"Top": 0.3571804463863373
},
{
"status":"success",
"photos":[
{
"url":"https://igcdn-photos-g-a.akamaihd.net/hphotos-ak-xap1/t51.2885-15/923814_820066611379246_1552953898_n.jpg",
"pid":"F@053cc435179f21343a93a33b62bd2ed4_80d9bf679638c",
"width":640,
"height":640,
"tags":[
{
@ollietb
ollietb / gist:10104310
Last active August 29, 2015 13:58
Multi curl example
<?php
/**
* Taken from https://bugs.php.net/bug.php?id=63842
* /
$MAX_SIMULTANEOUS = 50; // Adjust to whatever number of maximum simultaneous requests you think is appropriate.
// Fill array $reqList[] with whatever data you're using to generate your CURL requests,
// one request per array element, with consecutive indices starting at 0.
// note that requests at the END of the array will be started first.
$('#slideshow_container').css({height: '192px',width: '288px'});
$('#messages_container').css({height: '192px',width: '288px'});
<?php
/**
* Extends Twig with
* {{ "my string, whatever" | pre }} --> wraps with <pre>
* {{ myBigVar | yaml_dump | pre }} as {{ myBigVar | ydump }} or {{ myBigVar | dumpy }}
* {{ myBigVar | var_dump | pre }} as {{ myBigVar | dump }}
*
* You may control the depth of recursion with a parameter, say foo = array('a'=>array('b'=>array('c','d')))
*
@ollietb
ollietb / 1. README.md
Created July 10, 2012 11:02 — forked from Dattaya/1. README.md
Symfony2.1.*. How to integrate assetic lessphp filter.

Symfony2.1. How to integrate assetic lessphp filter.

  • Add the following package to your composer.json:
"require": {
    ...
    "leafo/lessphp": "dev-master",
 ...
@ollietb
ollietb / AppKernel.php
Created June 18, 2012 11:12
composer.json for symfony 2.0.15
<?php
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Symfony\Bundle\DoctrineBundle\DoctrineBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
<!--
The JCR repository - written in XML for easy reading. actual dumps will look more like this
http://willcode4beer.com/design.jsp?set=gettingStartedWithJCR&pageNum=4
-->
<root>
<!--
these pages are assigned layout and the hierarchy could represent the url structure
instead of the controller attribute, we might want to use custom nt:nodeType and map node types to controllers...
-->
<pages>