This file contains hidden or 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
npm ERR! error rolling back [email protected] Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/log.io/node_modules/jquery/node_modules/jsdom' | |
npm ERR! error installing [email protected] | |
npm http 304 https://registry.npmjs.org/tinycolor | |
npm ERR! Error: ENOENT, open '/usr/local/lib/node_modules/log.io/node_modules/jquery/node_modules/jsdom/node_modules/___cssom.npm/package/lib/CSSKeyframesRule.js' | |
npm ERR! You may report this log at: | |
npm ERR! <http://bugs.debian.org/npm> | |
npm ERR! or use | |
npm ERR! reportbug --attach /usr/local/lib/npm-debug.log npm | |
npm ERR! |
This file contains hidden or 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 ( | |
"crypto/tls" | |
"net" | |
"net/http" | |
"time" | |
"fmt" | |
"errors" | |
) |
This file contains hidden or 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
# Linear partition | |
# Partitions a sequence of non-negative integers into k ranges | |
# Based on Óscar López implementation in Python (http://stackoverflow.com/a/7942946) | |
# Also see http://www8.cs.umu.se/kurser/TDBAfl/VT06/algorithms/BOOK/BOOK2/NODE45.HTM | |
# Dependencies: UnderscoreJS (http://www.underscorejs.org) | |
# Example: linear_partition([9,2,6,3,8,5,8,1,7,3,4], 3) => [[9,2,6,3],[8,5,8],[1,7,3,4]] | |
linear_partition = (seq, k) => | |
n = seq.length | |
This file contains hidden or 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
(function () { | |
var n = this, | |
t = n._, | |
r = {}, e = Array.prototype, | |
u = Object.prototype, | |
i = Function.prototype, | |
a = e.push, | |
o = e.slice, | |
c = e.concat, | |
l = u.toString, |
This file contains hidden or 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
def to_route(url) | |
#strip out the /v4/ | |
url = url[4..-1] | |
dot = url.index('.') | |
#strip out the extension | |
url = url[0...dot] unless dot.nil? | |
parts = url.split('/') | |
if parts.length == 1 | |
"list #{parts[0]}" |
This file contains hidden or 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
/** | |
* Serialgraphy | |
* https://www.facebook.com/serialgraphy | |
* | |
* Released Under MIT License | |
* http://opensource.org/licenses/MIT | |
*/ | |
/** | |
* Global Helpers |
This file contains hidden or 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
/* Tiny web server in Golang for sharing a folder | |
Copyright (c) 2010 Alexis ROBERT <[email protected]> | |
Contains some code from Golang's http.ServeFile method, and | |
uses lighttpd's directory listing HTML template. */ | |
package main | |
import "http" | |
import "io" |
This file contains hidden or 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
bam: bam.c | |
gcc -g3 -I/usr/local/include -L/usr/local/lib -lcmph -lmicrohttpd bam.c -o bam | |
urls.txt: test.tsv | |
cut -f1 $^ | perl -nle 'print "http://localhost:8080/$$_"' > $@ | |
clean: | |
rm -rf bam bam.dSYM |
This file contains hidden or 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
$:.unshift(File.dirname(__FILE__)) | |
lib/ | |
app.rb | |
app/ |