Tested working on:
- Raspberry Pi 1 Model B+ (Using Docker hypriot/rpi-python) (debian/wheezy)
- Raspberry Pi 2 Model B (with virtualenv)
- Ubuntu Linux x64 (with virtualenv)
- Ubuntu Linux x64 (Using Docker)
- OS X Yosemite (with virtualenv)
require "./compiler/crystal/**" | |
while line = gets | |
compiler = Crystal::Compiler.new | |
program = Crystal::Program.new | |
program.target_machine = compiler.target_machine | |
prelude = program.normalize(Crystal::Require.new("prelude")) |
require 'test_helper' | |
shared_examples_for 'An Adapter' do | |
describe '#read' do | |
before do | |
@adapter.write(@key = 'whiskey', @value = "Jameson's") | |
end | |
it 'reads a given key' do | |
@adapter.read(@key).must_equal(@value) |
/******************************** | |
* GA data | |
********************************/ | |
let data = { | |
v: 1, | |
} | |
/******************************** | |
* Initializes GA data | |
* @param {string} tid your tracking id for GA | |
* @param {object} req the request object from event.request |
<?php | |
// EDIT MY PATH | |
$file = strtolower(file_get_contents('/Users/YOURUSER/Sites/TEST_TEST.txt')); | |
function get_points($layout = 'Norman') { | |
switch ($layout) { | |
case 'QWERTY': | |
$points[1] = array('s', 'd', 'f', 'j', 'k', 'l'); |
Tested working on:
# Syntax sugar | |
class ArrayValidator < EnumValidator | |
end |
// _decimal.scss | MIT License | gist.github.com/terkel/4373420 | |
// Round a number to specified digits. | |
// | |
// @param {Number} $number A number to round | |
// @param {Number} [$digits:0] Digits to output | |
// @param {String} [$mode:round] (round|ceil|floor) How to round a number | |
// @return {Number} A rounded number | |
// @example | |
// decimal-round(0.333) => 0 |
//----------------------------------*\ | |
// TRIGONOMETRY FUNCTIONS | |
//----------------------------------*/ | |
// # Trigonometry in CSS | |
// | |
// - Through Taylor/Maclaurin polynomial representation: http://people.math.sc.edu/girardi/m142/handouts/10sTaylorPolySeries.pdf | |
// - Useful if you don't want to use JS. | |
// - With CSS Variables. | |
// - `calc()` can't do power (x ^ y) so I used multiplication instead. |
# Ignore static version of the site (used to upload error pages to S3 for Heroku errors) | |
/out |