Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am sammyd on github.
* I am samd (https://keybase.io/samd) on keybase.
* I have a public key whose fingerprint is C18B BFF1 EDF6 E7A1 6C50 3B45 B8D4 E3D1 026A 6023
To claim this, I am signing this object:
@sammyd
sammyd / gist:92c5115c5585fb95c2ff
Created April 24, 2015 15:01
Using CIImage in a playground
import Foundation
import CoreImage
let url = NSBundle.mainBundle().URLForResource("400x400", withExtension: "jpeg")
let image = CIImage(contentsOfURL: url)
let filter = CIFilter(name: "CISepiaTone",
withInputParameters: [kCIInputImageKey : image,
@sammyd
sammyd / zipVideoProjects.sh
Created October 9, 2015 15:00
Zip the individual project directories for a RW Video formatted directory structure
#!/bin/bash
# Need two parameters
if [ $# -ne 2 ]; then
echo "Usage: $0 <path to book directory> <path to output dir>"
echo " No spaces or such funny characters are allowed."
exit 1
fi
# Location for the output
@sammyd
sammyd / Dockerfile
Created February 8, 2017 11:21
WIP PHP Dockerfile
FROM php:5.6-fpm
MAINTAINER Sam Davies <[email protected]>
# Add the required PHP extensions
RUN set -ex \
&& apt-get update \
&& apt-get install -y libjpeg-dev libpng12-dev git wget --no-install-recommends \
&& rm -r /var/lib/apt/lists/* \
&& echo '' | pecl install apcu-4.0.11 redis \
&& docker-php-ext-enable apcu redis \