This file contains 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
/* | |
example: | |
dimension(foo, bar, 2, 10px); | |
- gets the value bar inside foo map | |
- multiplies it by two | |
- adds 10px | |
*/ | |
$dimensions: ( | |
global: ( |
This file contains 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
// better describe() method that nests your describe blocks | |
// if you pass it a string with slashes | |
(function() { | |
var recursiveNestedDescribe = function(title, callback) { | |
var titleChunk = title.shift(); | |
if (title.length === 0) { | |
describe(titleChunk, callback); | |
} else { | |
describe('/' + titleChunk, function() { |
This file contains 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
require('colors'); | |
import webpack from 'webpack'; | |
import prettysize from 'prettysize'; | |
import fs from 'fs'; | |
import { execSync } from 'child_process'; | |
import Table from 'cli-table'; | |
import config from '../config/build.js'; | |
webpack(config).run((error, stats) => { | |
if (error) console.log(error.red); |
This file contains 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
#!/usr/bin/env ruby | |
# coding: utf-8 | |
require 'pbcopy' | |
project_data = File.read('projects.csv') | |
hours_data = File.read('hours.csv') | |
projects = project_data.split(/\n/) | |
projects.shift |
This file contains 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 store from 'data/store' | |
import browser from 'browser' | |
import Intro from './Intro' | |
import LevelEnd from './LevelEnd' | |
import Questions from './Questions' | |
import TimeoutTransitionGroup from 'vendor/timeout-transition-group' | |
export default React.createClass({ | |
_getScreen() { | |
const level = store.getLevel(this.props.level) |
This file contains 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
// option for inlining (for index) | |
// option for caching (for SVGs used more than once) | |
export default React.createClass({ | |
getInitialState() { | |
return { | |
svg: '' | |
} | |
}, |
This file contains 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
module.exports = React.createClass({ | |
getInitialState() { | |
return { | |
usingMouse : false, | |
focusedOnElement : false | |
} | |
}, | |
_setUsingMouse(usingMouse) { | |
this.setState({usingMouse: usingMouse}) |
This file contains 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
▓█████▄ ▒█████ █ ██ ▄████ ▄▄▄ ██▒ █▓▓█████ ██▀███ ▓██ ██▓ | |
▒██▀ ██▌▒██▒ ██▒ ██ ▓██▒ ██▒ ▀█▒ ▒████▄ ▓██░ █▒▓█ ▀ ▓██ ▒ ██▒▒██ ██▒ | |
░██ █▌▒██░ ██▒▓██ ▒██░▒██░▄▄▄░ ▒██ ▀█▄▓██ █▒░▒███ ▓██ ░▄█ ▒ ▒██ ██░ | |
░▓█▄ ▌▒██ ██░▓▓█ ░██░░▓█ ██▓ ░██▄▄▄▄██▒██ █░░▒▓█ ▄ ▒██▀▀█▄ ░ ▐██▓░ | |
░▒████▓ ░ ████▓▒░▒▒█████▓ ░▒▓███▀▒ ▓█ ▓██▒▒▀█░ ░▒████▒░██▓ ▒██▒ ░ ██▒▓░ | |
▒▒▓ ▒ ░ ▒░▒░▒░ ░▒▓▒ ▒ ▒ ░▒ ▒ ▒▒ ▓▒█░░ ▐░ ░░ ▒░ ░░ ▒▓ ░▒▓░ ██▒▒▒ | |
░ ▒ ▒ ░ ▒ ▒░ ░░▒░ ░ ░ ░ ░ ▒ ▒▒ ░░ ░░ ░ ░ ░ ░▒ ░ ▒░▓██ ░▒░ | |
░ ░ ░ ░ ░ ░ ▒ ░░░ ░ ░ ░ ░ ░ ░ ▒ ░░ ░ ░░ ░ ▒ ▒ ░░ | |
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ | |
░ ░ ░ ░ |
This file contains 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
// strip-units required by spread mixin | |
// http://stackoverflow.com/questions/12328259/how-do-you-strip-the-unit-from-any-number-in-sass | |
@function strip-units($number) | |
@return $number / ($number * 0 + 1) | |
// pow and sqrt required by ease function | |
// adapted from https://github.com/at-import/Sassy-math/blob/master/sass/math.scss | |
@function pow($base, $exponent) | |
$value: $base |
This file contains 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
=distribute($property, $min, $max, $start, $end, $precision, $metric) | |
#{$property}: $min | |
// get the range we're operating on | |
$range: $end - $start | |
// get the number of iterations we need to run by seeing how precise we should be | |
$loops: strip-units(ceil($range / $precision)) - 1 |
NewerOlder