Skip to content

Instantly share code, notes, and snippets.

@masih
masih / benchstat_summary.txt
Created January 28, 2025 14:45
ZSTD decompression benchmark across CGO bindings and pure-go
│ datadog │ klauspost │ klauspostSync │
│ sec/op │ sec/op vs base │ sec/op vs base │
1MiB 187.8µ ± 14% 353.5µ ± 1% +88.22% (p=0.002 n=6) 202.9µ ± 5% ~ (p=0.394 n=6)
10MiB 1.240m ± 3% 1.508m ± 0% +21.57% (p=0.002 n=6) 1.158m ± 3% -6.60% (p=0.002 n=6)
100MiB 12.97m ± 7% 15.58m ± 2% +20.19% (p=0.002 n=6) 13.94m ± 4% +7.48% (p=0.004 n=6)
calib 4.471 ± 3% 22.065 ± 0% +393.48% (p=0.002 n=6) 13.362 ± 2% +198.85% (p=0.002 n=6)
geomean 10.78m 20.69m +91.93% 14.46m +34.18%
│ datadog │ klauspost │ klauspostSync │
│ B/s │ B/s vs base │ B/s vs base │
@masih
masih / lotus-repeat-flaky-itest.yaml
Created November 26, 2024 09:38
Repeat Lotus itest on CI to detect flakiness
name: Repeat Lotus Flaky iTest
on:
pull_request:
jobs:
test:
name: ${{ matrix.test }} ${{ matrix.go }}
runs-on: ubuntu-latest
# needs: cache-test-bins
@masih
masih / go-update-all-deps.sh
Created May 28, 2024 15:37
Update all go mod dependencies to latest
#!/bin/bash
set -e
go list -json -m all | jq -r 'select(.Indirect != true and .Main != true) | "\(.Path)@latest"' | while read -r pkg; do
go get "$pkg"
done
go mod tidy
@masih
masih / keybase.md
Last active December 5, 2020 11:28
keybase.md

Keybase proof

I hereby claim:

  • I am masih on github.
  • I am masiih (https://keybase.io/masiih) on keybase.
  • I have a public key ASCpO8NVqr4LoRPcL0vzkP_YYucLV_EE8LyHg4E3ZIaKdwo

To claim this, I am signing this object:

@masih
masih / xclip_local_install.sh
Last active January 2, 2024 10:57
Installs XClip locally
#!/bin/bash
# Script for installing xclip on systems without root access.
# xclip will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
XCLIP_VERSION=0.12
@masih
masih / tottf.sh
Created May 2, 2014 11:37
Converts any font to TTF using FontForge
#!/usr/local/bin/fontforge
# Quick and dirty hack: converts a font to truetype (.ttf)
# Usage:
# for i in *.XXX; do fontforge -script tottf.sh $i; done
Print("Opening "+$1);
Open($1);
Print("Saving "+$1:r+".ttf");
Generate($1:r+".ttf");
Quit(0);
@masih
masih / fish_shell_local_install.sh
Last active November 15, 2024 03:54
Installs Fish Shell without root access
#!/bin/bash
# Script for installing Fish Shell on systems without root access.
# Fish Shell will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
FISH_SHELL_VERSION=2.1.1
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
#!/bin/sh
M2_REPO=${HOME}/.m2
OLDFILES=/tmp/deleted_artifacts.txt
AGE=195
echo "==== To be Deleted Jars ====" >> ${OLDFILES}
find "${M2_REPO}" -path '*SNAPSHOT*' -name '*jar' -type f -atime +${AGE} >> ${OLDFILES}
echo "==== To be Deleted Wars/Ears ====" >> ${OLDFILES}