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 defaultColors = [ '#000', '#D00', '#00CF12', '#C2CB00', '#3100CA', | |
'#E100C6', '#00CBCB', '#C7C7C7', '#686868', '#FF5959', '#00FF6B', | |
'#FAFF5C', '#775AFF', '#FF47FE', '#0FF', '#FFF' ]; | |
function term2html(text, options) { | |
options = options || {}; | |
var colors = options.colors || defaultColors; |
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
# Lean and Mean Serial DSL for CoffeeScript | |
# (based of https://gist.github.com/1090670 by timcameronryan) | |
serial = (spec) -> | |
commands = (func for key, func of spec when key != 'catch') | |
next = (err, args...) -> | |
return spec.catch(err) if err | |
commands.shift().apply(next, args) if commands.length > 0 | |
next null | |
return |
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 conllu = require('conllu-stream'); | |
var fs = require('fs'); | |
fs.createReadStream('ud-treebanks-v2.0/UD_German/de-ud-train.conllu') | |
.pipe(conllu()) | |
.on('data', sentence => { | |
console.log(sentence.features.sent_id, sentence.toString()); | |
}); |
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
// ES5 version of chalk replacement with chaining :) | |
var util = require("util"); | |
function C(text) { | |
var self = {}; | |
Object.keys(util.inspect.colors).forEach(function(name) { | |
var color = util.inspect.colors[name]; | |
self[name] = function() { | |
return C(util.format("\x1B[%sm%s\x1B[%sm", color[0], text, color[1])); |
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
main: main.cc | |
$(CXX) $< `PKG_CONFIG_PATH=/usr/local/opt/libxml2/lib/pkgconfig pkg-config --cflags --libs vipsCC` -o $@ |
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
/*jshint strict:true*/ | |
(function() { | |
'use strict'; | |
// Nyt scope, som ikke er tilgængeligt udefra. | |
// Bind reference til alle funktioner, som vi bruger, for at mindske risikoen for overskrivning. | |
var Number_toString_ = Number.prototype.toString; | |
var encodeURIComponent_ = encodeURIComponent; | |
var apply_ = Function.prototype.apply; |
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
socket.io present, connecting | |
test.html:18Subscribing to 1 files: | |
/test.css | |
test.html:18Received change notification for /test.css, refreshing | |
test.html:18Received change notification for /test.css, refreshing | |
##### Until this point it worked; it updated the CSS in the browser the first time. ##### | |
test.html:18Received change notification for /test.css, refreshing | |
test.html:18Received change notification for /test.css, refreshing |
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
$ egrep -Hrn 'require\(.sys' * | |
node_modules/less/bin/lessc:5: sys = require('sys'); | |
node_modules/less/benchmark/less-benchmark.js:3: sys = require('sys'); | |
node_modules/jsdom/lib/jsdom/level2/events.js:8: sys = require("sys"); | |
node_modules/jsdom/lib/jsdom/browser/index.js:1:var sys = require('sys'), | |
node_modules/jsdom/lib/jsdom/browser/htmltodom.js:102: var sys = require('sys'); | |
node_modules/jsdom/node_modules/htmlparser/utils_example.js:3:var sys = require("sys"); | |
node_modules/jsdom/node_modules/htmlparser/profile.js:3:var sys = require("sys"); | |
node_modules/jsdom/node_modules/htmlparser/testdata/api.html:319:<pre><code>var sys = require('sys'), |
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 = serial = (spec) -> | |
steps = (func for key, func of spec when key != 'catch') | |
raise = (err) -> if spec.catch then spec.catch err else throw err | |
next = (err, args...) -> | |
return raise(err) if err | |
steps.shift().apply(next, args) if steps.length > 0 | |
next._count = 0 | |
next._result = [] | |
next.parallel = -> | |
next._count++ |
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
Verifying that +walling is my Bitcoin username. You can send me #bitcoin here: https://onename.io/walling |
NewerOlder