Skip to content

Instantly share code, notes, and snippets.

# Use to build https://github.com/matvore/nfs-ganesha on macOS
cflags="-DHAVE_STRNLEN=1 -DHAVE_STRLCPY=1 -DHAVE_STRLCAT=1 \
-Wno-deprecated-declarations"
cmake --clean-first \
-DTIRPC_EPOLL:BOOL=OFF
-DBISON_EXECUTABLE:FILEPATH=$BREW_PREFIX/opt/bison/bin/bison \
-DUSE_FSAL_VFS:BOOL=OFF \
-DUSE_FSAL_XFS:BOOL=OFF \
@matvore
matvore / gist:301f2cf8ba0fc7699ddf26e55274a6bc
Created October 2, 2023 13:56
putc vs buffering benchmark
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
static FILE *fin, *fout;
static void byteperbyte(void)
{
int c;
var numpadremap = [
[/[0-9] /, {'!': '1', '@': '2', '#': '3', '$': '4', '%': '5', '^': '6', '&': '7', '*': '8', '(': '9', ')': '0',
'1': '!', '2': '@', '3': '#', '4': '$', '5': '%', '6': '^', '7': '&', '8': '*', '9': '(', '0': ')',
}],
];
// test
window.extended_macros.connom = [
['laL E ', function ()
window.extended_macros.wermwork = [
['raD T ', 'third_party/dtach'],
['laN G D ', 'ugrep -rg ^var/ -g ^tags -g "^third_party/websocketd/" '],
['raG R C ', ' third_party/hterm/*.js index.html session.c\001grep -n '],
['raR G T ', 'rm *_test.go'],
['raW B ', '$WERMSRCDIR/build\n'],
['raR S T ', 'third_party/st/build && DISPLAY=:1.0 third_party/st/st'],
['rarsR S T ', 'third_party/st/build && DISPLAY=:0.0 third_party/st/st'],
['raG F N ', './build && ../tst/ks'],
];
set -x
homedir=$WERMSRCDIR
ht=$homedir/third_party/hterm
dt=$homedir/third_party/dtach
ws=$homedir/third_party/websocketd
. $HOME/m/werm/env
set +x
cat <<'EOF'
https://www.openmymind.net/WebSocket-Framing-Masking-Fragmentation-and-More
browse () {
prdir=/tmp/prof.`tr -dc a-z </dev/random | head -c 20`
echo >&2 Profile dir: $prdir
mkdir $prdir
cat >$prdir/user.js <<EOF
user_pref('browser.places.speculativeConnect.enabled', false);
user_pref('browser.urlbar.speculativeConnect.enabled', false);
user_pref('network.http.speculative-parallel-limit', 0);
user_pref('app.normandy.enabled', false);