This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.6.+' | |
} | |
} | |
apply plugin: 'android' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Read analog voltage on pin 0 send to serial port every 3 seconds | |
*/ | |
const int analogInPin0 = A0; // Analog input pin | |
int sensorValue0 = 0; | |
void setup() { | |
// initialize serial communications at 9600 bps: | |
Serial.begin(9600); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get '/data/?' do | |
content_type :json | |
return [].to_json if (params[:start].nil? or Time.parse(params[:start]).nil?) | |
return [].to_json if (params[:stop].nil? or Time.parse(params[:stop]).nil?) | |
return [].to_json if (params[:step].nil?) | |
client = TempoDB::Client.new(API_KEY, API_SECRET) | |
start = Time.parse params[:start] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
import math | |
import datetime | |
from tempodb import Client, DataPoint | |
# Electronic component constants | |
POTENTIAL_DIVIDER_RESISTOR = 10000 | |
THERMISTOR_B_VALUE = 3977 | |
THERMISTOR_REF_TEMP = 298.15 | |
THERMISTOR_REF_RESISTANCE = 10000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DS_Store | |
*~ | |
*.swp | |
*~.nib | |
build/ | |
*.pbxuser | |
*.perspective | |
*.perspectivev3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Getting a repository: | |
git svn clone --tags <tags subfolder> --trunk <trunk subfolder> --branches <branches subfolder> | |
Updating SVN-tracking remote branches in git: | |
git svn fetch | |
Working on trunk: | |
git checkout master; git svn rebase | |
Working on a branch for the first time: |
NewerOlder