Skip to content

Instantly share code, notes, and snippets.

View Kubuxu's full-sized avatar

Jakub Sztandera Kubuxu

  • Protocol Labs
  • Kraków, Poland
View GitHub Profile
@Kubuxu
Kubuxu / github-notifications-beta-unsubscribe-repo.user.js
Last active June 20, 2023 16:35
Userscrip which adds a button to GitHub Beta Notifications Dashboard for unsubscribing from repos
// ==UserScript==
// @name GitHub Notifications Beta Automatic Unsubscribe (Local)
// @namespace https://kubuxu.com/
// @version 0.2
// @description Adds a button to GitHub Beta Notifications Dashboard for unsubscribing from repos
// @author @Kubuxu
// @match https://github.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant none
// @require http://code.jquery.com/jquery-latest.js
defer func() {
var fr [3]uintptr
runtime.Callers(1, fr[:])
frames := runtime.CallersFrames(fr[:])
if _, ok := frames.Next(); !ok {
return
}
frame, ok := frames.Next()
if !ok {
return

Ingredients for 12 buns:

  • 450g of white, high protein flour
  • 15g of potato starch or flour
  • 10g of sugar
  • 20g of fresh yeast (I think it might not be easy to find in US so active dry or instant should work too, use about 8g or less).
  • 125ml of milk
  • 125ml of lukewarm water
  • 7g of salt
  • 25g of neutral oil (sunflower, canola)
@Kubuxu
Kubuxu / rand_reads
Last active December 8, 2019 19:53
4KiB, 2525KiB/s
8KiB, 5177KiB/s
12KiB, 6992KiB/s
16KiB, 10.0MiB/s
24KiB, 12.4MiB/s
32KiB, 19.8MiB/s
64KiB, 38.7MiB/s
128KiB, 40.8MB/s
256KiB, 39.6MiB/s
512KiB, 54.8MiB/s
name time/op
Buzhash2/1K-4 601ns ± 4%
Buzhash2/1M-4 910µs ± 2%
Buzhash2/16M-4 18.8ms ± 1%
Buzhash2/100M-4 116ms ± 2%
Rabin/1K-4 74.3µs ± 3%
Rabin/1M-4 6.12ms ± 3%
Rabin/16M-4 92.1ms ± 4%
Rabin/100M-4 576ms ± 3%
Default/1K-4 590ns ± 5%
N = 600;
x = 1:N;
mean = 61;
scale = 3;
noisy = random('Rayleigh', scale, 1, N) + mean;
drop = 0.5/100; % packet drop chance
for i = x
if drop > rand()
#!/usr/bin/env bash
set -x
set -euo pipefail
IFS=$'\n\t'
HTTP_API="${1:-localhost:5001}"
tmpdir=$(mktemp -d)
export PPROF_TMPDIR="$tmpdir"
pushd "$tmpdir"
module github.com/ipfs/go-ipfs
require (
bazil.org/fuse v0.0.0-20180421153158-65cc252bf669
github.com/Kubuxu/go-os-helper v0.0.1
github.com/blang/semver v3.5.1+incompatible
github.com/bren2010/proquint v0.0.0-20160323162903-38337c27106d
github.com/cenkalti/backoff v2.1.1+incompatible
github.com/cheggaaa/pb v2.0.6+incompatible
github.com/dustin/go-humanize v1.0.0
#!/usr/bin/env bash
set -euo pipefail
travis_file=$(cat travis.example.yml)
## do_convert() performs the conversion. It can be called with an optional argument: the module to start with.
do_convert() {
modules=()
for d in $(find . -maxdepth 1 -mindepth 1 -type d | sort)
do
if [[ "$d" < ${1:-} ]]; then
#!/usr/bin/env bash
BADGOMODREGEX='\+replace.*=>\s+[/.]'
exec < /dev/tty
if git ls-files go.mod >/dev/null && [[ $(git diff --cached go.mod | grep -E -c "$BADGOMODREGEX") -ne 0 ]]; then
git diff --cached go.mod | grep -E "$BADGOMODREGEX"
read -p "There are local replace directives in go.mod. Are you sure you want to continue (y/n): " yn