Skip to content

Instantly share code, notes, and snippets.

@evanphx
evanphx / wasm.diff
Created July 6, 2021 05:00
Patch to rebase wasm import support
diff --git a/misc/wasm/wasm_exec.js b/misc/wasm/wasm_exec.js
index 231185a123..13030eea00 100644
--- a/misc/wasm/wasm_exec.js
+++ b/misc/wasm/wasm_exec.js
@@ -256,6 +256,9 @@
const timeOrigin = Date.now() - performance.now();
this.importObject = {
+ _gotest: {
+ add: (a, b) => a + b,
diff --git a/lib/kpeg/compiled_parser.rb b/lib/kpeg/compiled_parser.rb
index ff82467..eb16e32 100644
--- a/lib/kpeg/compiled_parser.rb
+++ b/lib/kpeg/compiled_parser.rb
@@ -51,6 +51,12 @@ module KPeg
@string = string
@string_size = string ? string.size : 0
@pos = pos
+
+ if string
got
2021-03-14T01:46:24.752Z 5a1426a7 lax [info] Starting instance
2021-03-14T01:46:24.797Z 5a1426a7 lax [info] Configuring virtual machine
2021-03-14T01:46:24.799Z 5a1426a7 lax [info] Pulling container image
2021-03-14T01:46:27.320Z 5a1426a7 lax [info] Unpacking image
2021-03-14T01:46:28.566Z 5a1426a7 lax [info] Preparing kernel init
2021-03-14T01:46:29.025Z 5a1426a7 lax [info] Configuring firecracker
2021-03-14T01:46:29.106Z 5a1426a7 lax [info] Starting virtual machine
2021-03-14T01:46:29.313Z 5a1426a7 lax [info] Starting init (commit: c1dec69)...
2021-03-14T01:46:29.335Z 5a1426a7 lax [info] Running: `/goapp/app` as root
2021-03-14T01:46:34.361Z 5a1426a7 lax [info] Error: UnhandledIoError(Os { code: 8, kind: Other, message: "Exec format error" })
mount("/proc/self/exe", "/run/runc/test/runc.mQQvkM", 0x8cbf35, MS_BIND, 0x8cbf35) = 0
mount("", "/run/runc/test/runc.mQQvkM", 0x8cbf35, MS_RDONLY|MS_REMOUNT|MS_BIND, "") = 0
openat(AT_FDCWD, "/run/runc/test/runc.mQQvkM", O_RDONLY|O_PATH) = 6
umount2("/run/runc/test/runc.mQQvkM", MNT_DETACH) = 0
unlink("/run/runc/test/runc.mQQvkM") = 0
execveat(6, "", ["./runc-rc8-mod", "init"], ["GOMAXPROCS=", "_LIBCONTAINER_CONSOLE=3", "_LIBCONTAINER_INITPIPE=4", "_LIBCONTAINER_STATEDIR=/run/runc"..., "_LIBCONTAINER_FIFOFD=5", "_LIBCONTAINER_INITTYPE=standard", "_LIBCONTAINER_CLONED_BINARY=1"], AT_EMPTY_PATH) = -1 ENOENT (No such file or directory)
close(6) = 0
@evanphx
evanphx / map.diff
Created September 6, 2016 17:26
clone(2) causing heap growth?
root@ea0a4fce183c:/proc/10# diff -u /tmp/maps6 /tmp/maps7
--- /tmp/maps6 2016-09-06 00:17:49.464078812 +0000
+++ /tmp/maps7 2016-09-06 00:42:58.275517610 +0000
@@ -1,7 +1,7 @@
564fdc34d000-564fdc637000 r-xp 00000000 00:2e 68 /usr/local/bin/ruby
564fdc836000-564fdc83d000 rw-p 002e9000 00:2e 68 /usr/local/bin/ruby
564fdc83d000-564fdc84d000 rw-p 00000000 00:00 0
-564fdd644000-564fde03b000 rw-p 00000000 00:00 0 [heap]
+564fdd644000-564fde3a4000 rw-p 00000000 00:00 0 [heap]
7f63fd3fb000-7f63fd421000 r-xp 00000000 00:2e 34 /lib/x86_64-linux-gnu/libtinfo.so.5.9
// OS X comm page time offsets
// http://www.opensource.apple.com/source/xnu/xnu-1699.26.8/osfmk/i386/cpu_capabilities.h
#define nt_tsc_base 0x50
#define nt_scale 0x58
#define nt_shift 0x5c
#define nt_ns_base 0x60
#define nt_generation 0x68
#define gtod_generation 0x6c
#define gtod_ns_base 0x70
#define gtod_sec_base 0x78
export KUBERNETES_PROVIDER=aws
export MASTER_SIZE=m4.large
export MINION_SIZE=m4.large
export NUM_MINIONS=4
export KUBE_AWS_INSTANCE_PREFIX=k8sp1
export MINION_ROOT_DISK_SIZE=64
export MASTER_RESERVED_IP=auto
@evanphx
evanphx / increase.json
Created March 3, 2016 06:35
Bug in Prometheus increase?
{
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"instance": "10.244.2.45:9090",
"job": "kubernetes",
"monitor": "kubernetes",
@evanphx
evanphx / component.js
Last active February 10, 2016 00:09
Ember observer
import Ember from 'ember';
export default Ember.Component.extend({
organizations: Ember.inject.service("organizations"),
activeOrgChange: Ember.observer("organizations.active", function() {
var name = this.get("organizations.active.name");
useName(name);
}
})