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
var otomata = [ 220, 233, 261, 293, 330, 349, 440, 523 ]; | |
var harmonicMinotaur = [ 262, 293, 311, 349, 391 ]; | |
var majorPentatonic = [ 262, 293, 329, 391, 440 ]; | |
var C0 =16.35, | |
Cs0=17.32, | |
D0 =18.35, | |
Ds0=19.45, | |
E0 =20.60, | |
F0 =21.83, |
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
//Copy this over the contents at tddbin.com | |
//Replace the [] in the assert statements with a functional equivalant | |
//Reference here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array | |
//Lambda syntax: (x,y) => x + y, works in firefox, try it out :) | |
function range(start, end, jump) { | |
jump = jump || 1 | |
if (start && !end) | |
return actualRange(0, start, jump) | |
return actualRange(start, end, jump) |
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
var fs = require('fs') | |
function printFormat(key) { | |
console.log(key + ": attr('" + model.properties[key].type + "'),") | |
} | |
var model = JSON.parse(fs.readFileSync(process.argv[2], {encoding: 'ascii'})) | |
Object.keys(model.properties).map(printFormat) |
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
<h2>Code Review Checklist</h2> | |
<input type="checkbox"> Read Ticket <br> | |
<input type="checkbox"> Works from clean install <br> | |
<input type="checkbox"> Test Functionality: Does it solve the problem/satisfy the AC? <br> | |
<input type="checkbox"> Green path <br> | |
<input type="checkbox"> Red path <br> | |
<hr> | |
<p>Look for</p> | |
<input type="checkbox"> Errors in inspector <br> |
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/local/bin/zsh | |
vagrant up | |
npm prune | |
npm install | |
npm run migrate:down && npm run migrate:up | |
cd client | |
npm prune | |
npm install |
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
// Download swagger.json from /explorer/swagger.json | |
'use strict' | |
const api = require('./swagger.json') | |
const rp = require('request-promise') | |
const apiUrl = 'http://something.com/api' | |
let requests = [] | |
for (let path of Object.keys(api.paths)) { | |
for (let method of Object.keys(api.paths[path])) { |
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
<pre id="maze"></pre> | |
<script> | |
'use strict' | |
const maze = [ | |
'#####', | |
'#@..#', | |
'###.#', | |
'#...#', | |
'#.#####', | |
'#.#...###', |
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
<pre id="maze"></pre> | |
<script> | |
'use strict' | |
const maze = [ | |
'#########', | |
'#@..#####', | |
'###.#####', | |
'#...#####', | |
'#.#######', | |
'#.#...###', |
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
<pre id="maze"></pre> | |
<script> | |
//Why a roguelike? | |
//A RL is a sweetspot between effort vs. new features | |
//You get something awesome every 5 LoC or even just by tweaking a single variable, and this makes it fun to program | |
//What's exciting about JS is that you can make something you can see in a browser, fast, and then share it with everyone | |
//JS being a simple to understand, practical, and easy to share language has helped it develop an awesome community | |
//Things to tweak | |
//Try adding a ghost trail to the player by not replacing their last position with a . | |
//Try making an AI that moves randomly, that moves towards the player, that runs away from the player (like tag) |
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
<canvas id='canvas' width='1000' height='1000'> | |
<script> | |
const c = document.getElementById('canvas') | |
const ctx = c.getContext('2d') | |
const unit = 100 | |
let player = {x: 1, y: 1} | |
let wall = {x: 1, y:0 } | |
//wall position is 1,0, wall is unit size | |
//wall width and height decrease linerarly with distance |
OlderNewer