Skip to content

Instantly share code, notes, and snippets.

View jbafford's full-sized avatar

John Bafford jbafford

View GitHub Profile
@jbafford
jbafford / CurlMulti.php
Created May 5, 2015 19:46
Curl Multi example
<?php
function DoCURLMulti($urls, $options, $processFn, &$errors)
{
$ch = array();
$mh = curl_multi_init();
foreach($urls as $urlID => $url)
{
$cr = curl_init();
@jbafford
jbafford / gist:3dae82370bad95c6741f
Created December 10, 2014 21:34
Doctrine Echoing Query Logger
<?php
$this->container->get('doctrine')
->getConnection()
->getConfiguration()
->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger())
;
@jbafford
jbafford / gist:d91ac15cf79a22e70f65
Created August 4, 2014 21:03
List OSX codesign versions for installed apps
find /Applications ~/Applications -maxdepth 3 -name "*.app" | while read a ; do echo; echo -n "$a ___ "; codesign -vd "${a}" 2>&1 | awk '/version/ {print $3}'; done | awk -F'___' '{print $2 " " $1}' | sort -u
@jbafford
jbafford / gist:9508871
Last active August 29, 2015 13:57
keybase.md
### Keybase proof
I hereby claim:
* I am jbafford on github.
* I am jbafford (https://keybase.io/jbafford) on keybase.
* I have a public key whose fingerprint is A73C 954B 97F3 987B CF6C 89F3 752C E872 A14E 6887
To claim this, I am signing this object: