Skip to content

Instantly share code, notes, and snippets.

View harrishancock's full-sized avatar

Harris Hancock harrishancock

View GitHub Profile
@harrishancock
harrishancock / streaming-responses-200.js
Created March 1, 2018 18:48
Cloudflare Workers streaming response bodies example with unconditional 200
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
/**
* Make multiple requests,
* aggregate the responses and
* stream it back as a single response.
*/
async function fetchAndApply(request) {
@harrishancock
harrishancock / cmake-after.txt
Created July 29, 2017 08:43
CMake installation of Cap'n Proto, `ls -l *.so` and `readelf -d *.so` (after)
-rw-r--r-- 1 harris harris 873984 Jul 28 21:53 libcapnp-0.7-dev.so
-rw-r--r-- 1 harris harris 1083240 Jul 28 21:54 libcapnpc-0.7-dev.so
-rw-r--r-- 1 harris harris 1083240 Jul 28 22:55 libcapnpc.so
-rw-r--r-- 1 harris harris 138712 Jul 28 21:54 libcapnp-json-0.7-dev.so
-rw-r--r-- 1 harris harris 138712 Jul 28 22:55 libcapnp-json.so
-rw-r--r-- 1 harris harris 1217472 Jul 28 21:55 libcapnp-rpc-0.7-dev.so
-rw-r--r-- 1 harris harris 1217472 Jul 28 22:55 libcapnp-rpc.so
-rw-r--r-- 1 harris harris 873984 Jul 28 22:55 libcapnp.so
-rw-r--r-- 1 harris harris 425848 Jul 28 21:52 libkj-0.7-dev.so
-rw-r--r-- 1 harris harris 481424 Jul 28 21:53 libkj-async-0.7-dev.so
@harrishancock
harrishancock / cmake-before.txt
Created July 29, 2017 08:43
CMake installation of Cap'n Proto, `ls -l *.so` and `readelf -d *.so` (before)
lrwxrwxrwx 1 harris harris 20 Jul 28 21:49 libcapnpc.so -> libcapnpc.so.0.7-dev
-rw-r--r-- 1 harris harris 1083240 Jul 28 21:45 libcapnpc.so.0.7-dev
lrwxrwxrwx 1 harris harris 24 Jul 28 21:49 libcapnp-json.so -> libcapnp-json.so.0.7-dev
-rw-r--r-- 1 harris harris 138712 Jul 28 21:46 libcapnp-json.so.0.7-dev
lrwxrwxrwx 1 harris harris 23 Jul 28 21:49 libcapnp-rpc.so -> libcapnp-rpc.so.0.7-dev
-rw-r--r-- 1 harris harris 1217472 Jul 28 21:46 libcapnp-rpc.so.0.7-dev
lrwxrwxrwx 1 harris harris 19 Jul 28 21:49 libcapnp.so -> libcapnp.so.0.7-dev
-rw-r--r-- 1 harris harris 873984 Jul 28 21:44 libcapnp.so.0.7-dev
lrwxrwxrwx 1 harris harris 22 Jul 28 21:49 libkj-async.so -> libkj-async.so.0.7-dev
-rw-r--r-- 1 harris harris 481424 Jul 28 21:44 libkj-async.so.0.7-dev
@harrishancock
harrishancock / autotools.txt
Created July 29, 2017 08:40
autotools installation of Cap'n Proto, `ls -l *.so` and `readelf -d *.so`
-rwxr-xr-x 1 harris harris 785528 Jul 27 19:55 libcapnp-0.7-dev.so
-rwxr-xr-x 1 harris harris 1018064 Jul 27 19:55 libcapnpc-0.7-dev.so
-rwxr-xr-x 1 harris harris 1018064 Jul 27 19:55 libcapnpc.so
-rwxr-xr-x 1 harris harris 136176 Jul 27 19:55 libcapnp-json-0.7-dev.so
-rwxr-xr-x 1 harris harris 136176 Jul 27 19:55 libcapnp-json.so
-rwxr-xr-x 1 harris harris 1204504 Jul 27 19:55 libcapnp-rpc-0.7-dev.so
-rwxr-xr-x 1 harris harris 1204504 Jul 27 19:55 libcapnp-rpc.so
-rwxr-xr-x 1 harris harris 785528 Jul 27 19:55 libcapnp.so
-rwxr-xr-x 1 harris harris 317968 Jul 27 19:55 libkj-0.7-dev.so
-rwxr-xr-x 1 harris harris 451072 Jul 27 19:55 libkj-async-0.7-dev.so
@harrishancock
harrishancock / gist:f5ff6bc92ea149071f20893830d9c06d
Created January 10, 2017 21:43
Test output from read-until-delim
# Test client command line:
# curl -X PUT -d "Hello, world! 01234567890123456789overread" localhost:3337
harris@harris-VirtualBox:~/git/beast/build/examples$ ./read-until-delim 3337 170 30
Listening on port 3337 with header buffer size 170, body buffer size 30
Accepted connection from 127.0.0.1:51066
Read 170 bytes
HEADER IS 147 BYTES:
@harrishancock
harrishancock / gist:307741231c24e16e6f8d86d92a14883e
Created December 11, 2016 19:16
Example MSVC output that is unparseable by vscode-cmake-tools
[vscode] Executing command: cmake --build c:/Users/vortr/git/sandstorm/capnproto/build --target ALL_BUILD --config Debug -- /m /property:GenerateFullPaths=true
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 12/11/2016 11:13:50 AM.
1>Project "C:\Users\vortr\git\sandstorm\capnproto\build\ALL_BUILD.vcxproj" on node 1 (default targets).
1>Project "C:\Users\vortr\git\sandstorm\capnproto\build\ALL_BUILD.vcxproj" (1) is building "C:\Users\vortr\git\sandstorm\capnproto\build\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).
2>InitializeBuildStatus:
Creating "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
@harrishancock
harrishancock / gist:54accdd8beae10b93b5fbd4c652b9e2a
Created November 14, 2016 20:02
capnproto/async-win32-vs2015 test results
C:\Users\vortr\git\sandstorm\capnproto\build\src>ctest -V -C debug
UpdateCTestConfiguration from :C:/Users/vortr/git/sandstorm/capnproto/build/src/DartConfiguration.tcl
UpdateCTestConfiguration from :C:/Users/vortr/git/sandstorm/capnproto/build/src/DartConfiguration.tcl
Test project C:/Users/vortr/git/sandstorm/capnproto/build/src
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
// Usage:
// wget http://download.qt.io/archive/qt/5.5/5.5.1/qt-opensource-windows-x86-msvc2013-5.5.1.exe
// ./qt-opensource....exe --script <this script> -platform minimal
function Controller() {
installer.autoRejectMessageBoxes();
installer.installationFinished.connect(function() {
gui.clickButton(buttons.NextButton);
})
}
UpdateCTestConfiguration from :C:/Users/vortr/git/sandstorm/capnp-vs2015/build/src/DartConfiguration.tcl
UpdateCTestConfiguration from :C:/Users/vortr/git/sandstorm/capnp-vs2015/build/src/DartConfiguration.tcl
Test project C:/Users/vortr/git/sandstorm/capnp-vs2015/build/src
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
Checking test dependency graph end
test 1
Start 1: kj-tests-run

Keybase proof

I hereby claim:

  • I am harrishancock on github.
  • I am harrishancock (https://keybase.io/harrishancock) on keybase.
  • I have a public key whose fingerprint is CB4C B5D9 C4A0 588A 60AC 98AE F9C2 0541 80D2 2C13

To claim this, I am signing this object: