View tuning-fork.js
var context = new AudioContext(),
gainNode = context.createGain(),
oscillator = context.createOscillator();
gainNode.connect(context.destination);
oscillator.frequency.value = 440;
oscillator.connect(gainNode);
oscillator.start();
// ..
// gainNode.gain.value = 0;
View anthropology
|-------------------------|-------------------------|-------------------------|-------------------------|
|-------------------------|-------------------------|-------------------------|-------------------------|
|----7--------8--6--7--10-|----------8-----10-8-----|----7--8--7-----------7--|-------------------------|
|-8-----10-9--------------|-------------------------|-------------10-7--8-----|-10----8--7-----------8--|
|-------------------------|-------------------------|-------------------------|----10-------------------|
|-------------------------|-------------------------|-------------------------|-------------------------|
| + - + - + - + - | + - + - + - + - | + - + - + - + - | + - + - + - + - |
|-------------------------|-------------------------|-------------------------|-------------------------|
|-------------------------|-------------------------|----------------9-----7--|-8-----------------------|
View unit-matcher.js
// Take "3mm", "-3inches", or "3.45 cm" and return ['3', 'mm'], ['-3', 'inches'], ["3.45", "cm"] etc
function unitParse (str) {
return (str.match(/([-\d.]+)\s+?([A-Za-z]+)/) || []).slice(1)
}
View line-slope-intercept.js
function Line (slope, intercept) {
this.slope = slope
this.intercept = intercept
}
function getX (y) {
y = y || 0
return (y - this.intercept) / this.slope
}
Line.prototype.getX = getX;
View cons.js
const cons = (a, b) =>
(member) => {
if (member === 1) {
return a
} else if (member === 2) {
return b
}
}
const car = (pair) =>
View index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Scratch pad</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mocha/2.2.5/mocha.min.css" />
</head>
<body>
<div id="mocha"></div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/chai/3.2.0/chai.min.js"></script>
View a_ok.rb
(1..10e6).map {
SecureRandom.uuid
}.reduce(Hash.new(0)) { |counts, uuid|
counts[uuid] += 1
counts
}.values.uniq
View rough-outline-of-steps.md

Rough outline of the steps in an isolated design job

  • Define project objectives
  • Review identity standards
  • Develop concepts and prototypes (The Design process)
  • Present solution
  • Evaluate solution (Maybe loops back to Develop)
  • Prepare for production
  • Evaluate finished piece(s) (Maybe loops back to Develop)
  • Deliver finished files for production / distribution
View method-compose.js
const { keys, assign } = Object
const concern = {
doSideEffectyThing () {
this.property1 = 'Hip, hip!'
}
}
const instance = {
someProp: 'Foo',
View reduced.js
const range = (start, end) =>
Array.from({
length: end - start
}).map((_, index) => (index + start))
const sum = nums =>
nums.reduce((total, num) => total + num)
sum(range(20, 100))