Skip to content

Instantly share code, notes, and snippets.

View cutecycle's full-sized avatar

Nina Reynolds cutecycle

View GitHub Profile
FILES=`find . -type f -name "*.csv"`
for f in FILES do
trunc=${f##*/}
csv2json -s "|" ${trunc%_temp_csv.csv} ${trunc}.json
done
1 XLSXFILES=$(wildcard ./*.xlsx)
2 OUTCSV=$(SOURCES: .xlsx=.csv)
3
4 ./data/masters: $(XLSXFILES)
5 in2csv $@ > $(OUTCSV)
@cutecycle
cutecycle / README.md
Created February 22, 2016 21:25 — forked from rkirsling/LICENSE
Directed Graph Editor

Click in the open space to add a node, drag from one node to another to add an edge.
Ctrl-drag a node to move the graph layout.
Click a node or an edge to select it.

When a node is selected: R toggles reflexivity, Delete removes the node.
When an edge is selected: L(eft), R(ight), B(oth) change direction, Delete removes the edge.

To see this example as part of a larger project, check out Modal Logic Playground!

@cutecycle
cutecycle / world.js
Last active February 28, 2016 03:38
line is a function, entity is not: line 37
var world = function () {
//init
}
var self=this;
var entity = function(id) {
return entities_json.find(function(value) {
var pass = (value.entityid === id);
return pass;
});
@cutecycle
cutecycle / resolveLines
Created May 22, 2016 01:13
Array.find crash at length = 1447
var look = function(lineid) {
var find;
find = (lines_json.find( function(value) {
return (value.lineid === lineid);
}));
if(find.speakerid !== "" || (typeof find.speakerid === "undefined")) {
find.retrievedSpeaker = line(entity(find.speakerid).entityname);
}
lines_out.push(find);
if(find.advance_lineid !== "" || (typeof find.advance_lineid === "undefined")) {
var kuroshiro = require('kuroshiro');
var japaneasy = require('japaneasy');
var readline = require('readline');
var async = require('async');
// var ParseJapanese = require('parse-japanese');
var fs = require('fs');
var path = require('path');
//var japanese = new ParseJapanese();
var wwwjdic = new japaneasy({
a(state) {
state.x = 5;
}
b(state) {
out = state;
out.x = 5;
return out;
@cutecycle
cutecycle / "hi"
Last active June 4, 2017 07:11
Scope issue?
a = function () {
console.log('hi');
}
function b() {
console.log('eh whatever');
debugger;
}
b();
> a = {b: [1,2,3], c:[4,5,6]}
{ b: [ 1, 2, 3 ], c: [ 4, 5, 6 ] }
> function log(...args) { console.log(args) }
undefined
> log(a)
[ { b: [ 1, 2, 3 ], c: [ 4, 5, 6 ] } ]
undefined
> log(...a)
TypeError: (var)[Symbol.iterator] is not a function
at repl:1:8
// See http://brunch.io for documentation.
exports.files = {
javascripts: {
joinTo: {
'vendor.js': /^(?!app)/, // Files that are not in `app` dir.
'game-browser.js': /^app/
}
},
stylesheets: {
joinTo: 'app.css'