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)
| <?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'); |
| // _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 |
| 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) |
| # Syntax sugar | |
| class ArrayValidator < EnumValidator | |
| end |
| # Ignore static version of the site (used to upload error pages to S3 for Heroku errors) | |
| /out |
| 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")) |
Tested working on:
| //----------------------------------*\ | |
| // 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. |
| require 'bundler/inline' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'colorize' | |
| end | |
| class MatcherInterface | |
| def initialize(some_object) | |
| @some_object = some_object |
| (function (context, trackingId, options) { | |
| const history = context.history; | |
| const doc = document; | |
| const nav = navigator || {}; | |
| const storage = localStorage; | |
| const encode = encodeURIComponent; | |
| const pushState = history.pushState; | |
| const typeException = 'exception'; | |
| const generateId = () => Math.random().toString(36); | |
| const getId = () => { |