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
package main | |
import ( | |
"errors" | |
"fmt" | |
"image/color" | |
"log" | |
"math/rand" | |
"runtime/debug" | |
"time" |
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
package main | |
import ( | |
"image" | |
"image/color" | |
"log" | |
"github.com/hajimehoshi/ebiten/v2" | |
"github.com/hajimehoshi/ebiten/v2/vector" | |
) |
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
'use strict'; | |
var through = require('through2'); | |
var PluginError = require('gulp-util').PluginError; | |
var Handlebars = require('handlebars'); | |
var PLUGIN_NAME = 'gulp-handlebars-template'; | |
// partly taken from: https://github.com/gulpjs/gulp/blob/master/docs/writing-a-plugin/guidelines.md |
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
// NOTE requires lodash v3.4.0+ (for _.sum) and Node 4.0+ (for arrow function) | |
var _ = require('lodash'); | |
function σ (array) { | |
var avg = _.sum(array) / array.length; | |
return Math.sqrt(_.sum(_.map(array, (i) => Math.pow((i - avg), 2))) / array.length); | |
}; |
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 node | |
/* | |
* much of this was taken from: | |
* https://bitbucket.org/ariya/missing-doc/src/master/missing-doc.js | |
*/ | |
'use strict'; | |
var _ = require('lodash'), |
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 is intended to be run in Node. Provided a path to the lodash source file as a command-line argument. | |
There were a few edge case handlers that I removed; they only helped in a few places while severely reducing code clarity. There's also some weirdness with how it interprets literals that cause them to not match (see _.escapeRegExp), but it's not worth the time to fix. | |
Let me know. |