Skip to content

Instantly share code, notes, and snippets.

(define E_AGAIN 11)
(define (try-unix-socket-accept s)
(let-values ([(them addr) (_accept s (sockaddr-len))])
(if (or (> them -1) (not (eqv? (saved-errno) E_AGAIN)))
(values them addr)
(begin
(sleep 0.1)
(try-unix-socket-accept s)))))
import sys
import pdb
# iterate over 'blocksize' elems of a list at once.
def blocks(xs, blocksize):
for i in xrange(0, len(xs), blocksize):
yield xs[i:i+blocksize]
import sys
import pdb
# iterate over 'blocksize' elems of a list at once.
def blocks(xs, blocksize):
for i in xrange(0, len(xs), blocksize):
yield xs[i:i+blocksize]
C:\Users\Shawn>python process.py test.txt test2.txt test3.txt
foo1
foo2
foo3
foo4
foo5
bar1
bar2
bar3
bar4
### Keybase proof
I hereby claim:
* I am shawwn on github.
* I am shawwn (https://keybase.io/shawwn) on keybase.
* I have a public key ASCSzNDE25fceoOR5trU3JhkbzUTPVpdEdT-YEhm8zs94wo
To claim this, I am signing this object:
$ node bench.js
2 bytes
15 tests completed.
md5 x 331,540 ops/sec ±2.01% (75 runs sampled)
sha1 x 266,937 ops/sec ±3.92% (71 runs sampled)
sha256 x 225,208 ops/sec ±4.56% (67 runs sampled)
sha512 x 250,324 ops/sec ±4.38% (69 runs sampled)
farmHash-hash64 x 585,625 ops/sec ±3.86% (72 runs sampled)
#!/usr/bin/env python
#==============================================================================
# Functionality
#==============================================================================
import pdb
import sys
import os
import re
This file has been truncated, but you can view the full file.
/*! For license information please see components_GLEasterEgg_app_GLEasterEgg_2fd989964ab5d9d1f8bdffdf5d09f42e-4394f555f71e35769463.js.LICENSE */
__NEXT_REGISTER_CHUNK("components_GLEasterEgg_app_GLEasterEgg_2fd989964ab5d9d1f8bdffdf5d09f42e", function() {
webpackJsonp([1], {
536: function(t, e, n) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
});
var i = n(1),
r = n.n(i),
@shawwn
shawwn / exokit-bisect.log
Created April 14, 2018 10:55
Bisecting the OS X resource loading error for Exokit
git bisect start
# bad: [c5230ff9006da945693f72d77119885d31d7ca6e] Bump exokit-core version
git bisect bad c5230ff9006da945693f72d77119885d31d7ca6e
# good: [ad436b923b1e2991725cdcf38c380bb77b398f29] 0.0.104
git bisect good ad436b923b1e2991725cdcf38c380bb77b398f29
# bad: [f069bec5161f27d7d03f775659a47ccc15c98428] Clean up exokit-bindings imageBitmap context creation
git bisect bad f069bec5161f27d7d03f775659a47ccc15c98428
# good: [73264fb8d21f8c3c8bc98dfab047326f4cb83002] Initial size arg support
git bisect good 73264fb8d21f8c3c8bc98dfab047326f4cb83002
# skip: [a8124cca7c9a5e880c4bce5eff479beeecae21de] Add exodump.2
var create = (globals) => {
var _G = Object.assign({
}, globals || {
});
_G._G = _G;
_G.environment = [{
}];
var nil63 = (x) => {
return x === undefined || x === null;
};