Skip to content

Instantly share code, notes, and snippets.

Brion Vibber brion

Block or report user

Report or block brion

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@brion
brion / gist:fda801c7e44ba63382e06602b21f631a
Created Jun 11, 2019
strace of `notepad.exe Cargo.toml` in WSL on arm64
View gist:fda801c7e44ba63382e06602b21f631a
$ strace notepad.exe Cargo.toml
execve("/mnt/c/WINDOWS/system32/notepad.exe", ["notepad.exe", "Cargo.toml"], 0x7fffedf9b8f8 /* 19 vars */) = 0
set_tid_address(0xc2828) = 101
brk(NULL) = 0x1e4f000
brk(0x1e50000) = 0x1e50000
sched_getaffinity(0, 128, [0, 1, 2, 3, 4, 5, 6, 7]) = 64
uname({sysname="Linux", nodename="aarchie", ...}) = 0
getpid() = 101
getcwd("/home/brion/src/png/mtpng", 4096) = 26
openat(AT_FDCWD, "/dev/lxss", O_RDWR|O_LARGEFILE) = 3
View output.txt
$ make
emcc -O1 -g4 -s WASM_OBJECT_FILES=0 -c -o test.o test.c
shared:DEBUG: EM_CONFIG is located in /home/brion/.emscripten
shared:DEBUG: TEMP_DIR not defined in /home/brion/.emscripten, using /tmp
shared:DEBUG: PYTHON not defined in /home/brion/.emscripten, using "/usr/bin/python"
shared:DEBUG: JAVA not defined in /home/brion/.emscripten, using "java"
emscripten:DEBUG: Cache: PID 5591 acquiring multiprocess file lock to Emscripten cache at /home/brion/.emscripten_cache
emscripten:DEBUG: Cache: done
emscripten:DEBUG: Cache: PID 5591 released multiprocess file lock to Emscripten cache at /home/brion/.emscripten_cache
shared:DEBUG: check tells us to use wasm backend
View cdef_filter_block_c.wast
(func $_cdef_filter_block_c (; 407 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) (param $10 i32)
(local $11 i32)
(local $12 i32)
(local $13 i32)
(local $14 i32)
(local $15 i32)
(local $16 i32)
(local $17 i32)
(local $18 i32)
(local $19 i32)
@brion
brion / async-bench.js
Created Jan 12, 2019
Quick bench of a loop that does an async/await call on every iteration
View async-bench.js
"use strict";
class Bench {
constructor() {
this.x = 0;
this.iters = 1000000;
}
ms() {
return Date.now();
@brion
brion / run-aarch64.sh
Created Jan 7, 2019
Fedora aarch64 QEMU system image runner script
View run-aarch64.sh
#!/bin/bash
# Starter script for Fedora aarch64 in QEMU, cobbled from various sources.
# Requires qemu-system-aarch64 to be installed.
# Configuration options:
IMAGE=fedora-29-aarch64.img
RAM=2048
CPUS=4
@brion
brion / karma.bas
Created Oct 13, 2018
my MS-DOS QuickBASIC port of 'Karma' for Amiga from Compute! magazine
View karma.bas
'my MS-DOS QuickBASIC port of 'Karma' for Amiga
'originally published in Compute! magazine
'works with QuickBASIC 4.5 in DosBox
'use: qbas karma /l
DECLARE SUB mouse (m0%, m1%, m2%, m3%)
DECLARE SUB mShow ()
DECLARE SUB mHide ()
DEFINT A-Z
TYPE RegType
AX AS INTEGER
@brion
brion / smart-pointer-overload.cpp
Created May 16, 2018
smart pointer overload confusion
View smart-pointer-overload.cpp
#include <iostream>
class Obj;
class Wrapper {
Obj* ptr;
public:
Wrapper(Obj* aptr) : ptr(aptr) {}
Obj& operator*() {
@brion
brion / gist:bee024ddc48a82950524a6b34fe0e353
Created May 11, 2018
gio info for a .gnome-photos file
View gist:bee024ddc48a82950524a6b34fe0e353
(Fedora 28; Photos installed from fedora repo)
$ gio info 'Screenshot from 2018-05-11 09-15-17.png.gnome-photos'
display name: Screenshot from 2018-05-11 09-15-17.png.gnome-photos
edit name: Screenshot from 2018-05-11 09-15-17.png.gnome-photos
name: Screenshot from 2018-05-11 09-15-17.png.gnome-photos
type: regular
size: 1219
uri: file:///home/brion/Pictures/Screenshot%20from%202018-05-11%2009-15-17.png.gnome-photos
attributes:
@brion
brion / gist:bda3be94f6be3998e7b031b8737829a3
Created Feb 22, 2018
British Library guest network to Wikimedia traceroute
View gist:bda3be94f6be3998e7b031b8737829a3
This is some weird stuff. Seeing >500ms latencies between London (on British Library's guest network) and WMF's Virginia DC.
$ traceroute gerrit.wikimedia.org
traceroute to gerrit.wikimedia.org (208.80.154.85), 64 hops max, 52 byte packets
1 controller (10.2.0.2) 2.761 ms 2.493 ms 1.171 ms
2 10.1.2.1 (10.1.2.1) 2.250 ms 2.211 ms 1.628 ms
3 37.205.58.145 (37.205.58.145) 3.566 ms 2.984 ms 2.582 ms
4 10.100.14.182 (10.100.14.182) 513.088 ms 51.117 ms 2.626 ms
5 9-1-6.ear2.london15.level3.net (217.163.45.205) 93.576 ms 3.060 ms 2.703 ms
6 ae-2-3204.ear2.london2.level3.net (4.69.143.194) 3.324 ms
@brion
brion / missing-objects.txt
Created Nov 14, 2017
flathub errors while updating
View missing-objects.txt
Updating: org.freedesktop.Platform.GL.nvidia-384-90/x86_64/1.4 from flathub
Warning: Failed to update org.freedesktop.Platform.GL.nvidia-384-90/x86_64/1.4: While pulling runtime/org.freedesktop.Platform.GL.nvidia-384-90/x86_64/1.4 from remote flathub: No such metadata object e92eaddbf30d6b0e12944de48c2d9283f28d58414f503cecbc67a661cbd3fcd4.commit
Updating: org.freedesktop.Platform.Compat32/x86_64/1.6 from flathub
You can’t perform that action at this time.