Skip to content

Instantly share code, notes, and snippets.

View barrbrain's full-sized avatar

David Michael Barr barrbrain

View GitHub Profile
@barrbrain
barrbrain / siso.diff
Created May 13, 2025 14:47
Paste over siso/nativelink connection issues
diff --git a/go/src/infra/build/siso/auth/cred/credhelper.go b/go/src/infra/build/siso/auth/cred/credhelper.go
index 16d173e978..2b6179de21 100644
--- a/go/src/infra/build/siso/auth/cred/credhelper.go
+++ b/go/src/infra/build/siso/auth/cred/credhelper.go
@@ -158,7 +158,7 @@ func (h *credHelper) token(endpoint string) (*oauth2.Token, error) {
}
auth := prc.headers["authorization"]
if auth == "" {
- return nil, fmt.Errorf("no Authorization in resp from helper %s: %w\nstdout: %s", h.path, err, string(prc.stdout))
+ auth = "Bearer "
@barrbrain
barrbrain / default-kvrocks.nix
Last active March 27, 2025 14:15
kvrocks.nix
{ pkgs ? import <nixpkgs> {
localSystem = {
gcc.arch = "x86-64-v3";
gcc.tune = "alderlake";
system = "x86_64-linux";
};
} }:
let kvrocks = pkgs.stdenv.mkDerivation (finalAttrs: with pkgs; {
pname = "kvrocks";
@barrbrain
barrbrain / nixos-build-gcroots.bash
Last active July 11, 2024 07:03
Pin NixOS build deps
set -e
ROOTS=${1:-/root/dev-roots}
mkdir -p "$ROOTS"
rm "$ROOTS/"*
nix --extra-experimental-features nix-command derivation show -r /run/current-system |
jq -r 'map(select(.outputs.out.path)) | map(.outputs.out.path) | unique .[]' |
grep -xFf <(nix-store --gc --print-dead) |
xargs ln -vst "$ROOTS"
ln -vst /nix/var/nix/gcroots/auto "$ROOTS/"*
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
call plug#begin('~/.local/share/nvim/plugged')
Plug 'rust-lang/rust.vim'
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
"Plug 'vim-denops/denops.vim'
"Plug 'vim-denops/denops-helloworld.vim'
Plug 'Shougo/ddu.vim'
Plug 'Shougo/ddu-ui-ff'
@barrbrain
barrbrain / Static-model.ipynb
Last active June 14, 2023 13:55
Rav1e temporal strength analysis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@barrbrain
barrbrain / mirror-clearlinux.sh
Last active September 26, 2022 02:26
Seed a Clear Linux* Mirror
upstream=https://cdn-alt.download.clearlinux.org/update
mkdir mirror-download-clearlinux-org
cd mirror-download-clearlinux-org
format=30
latest=`curl -s $upstream/version/format$format/latest`
minversion=`curl -s $upstream/$latest/Manifest.MoM | awk '/^minversion:/{print$2}'`
for SUBDIR in 0 version $minversion
do wget --no-verbose --no-parent --recursive --no-host-directories -erobots=off --reject "index.html" \
$upstream/update/$SUBDIR/
done
@barrbrain
barrbrain / plot.py
Last active September 24, 2022 08:01
rav1e 0.6 efficiency
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
v5_1 = np.array([
[18.2344,0.8817],
[7.6955,0.8927],
[3.4063,0.9219],
[2.1284,0.9350],
[1.6182,0.9551],
@barrbrain
barrbrain / avx2_fma.txt
Last active September 8, 2022 14:47
rav1e-ch cpu features
17590 mov
5373 lea
3701 add
3632 cmp
1740 jmp
1708 call
1534 sub
1281 cmovl
1272 imul
1230 push