Skip to content

Instantly share code, notes, and snippets.

efibootmgr --create --disk /dev/nvme0n1p1 --loader /EFI/netboot.xyz/netboot.xyz.efi --label "Netboot.xyz"
@luoq
luoq / backup_git_repos.sh
Last active January 1, 2024 13:03
backup git repos under a directory
#!/bin/bash
set -eu
src_root=$1
dst_root=$2
max_depth=${3:-5}
cd $src_root
for repo in $(find . -maxdepth $max_depth -type d -name .git); do
repo=$(dirname $repo)
echo "backup $repo"
dst_repo=$dst_root/${repo}.git
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@luoq
luoq / README.md
Last active November 10, 2017 02:01

test pickle for instance method

pickling instance method failed for python2

@luoq
luoq / vw_hash.md
Last active August 20, 2020 11:34
how feature hash is calculated in vw

feature hashing in vw

base hash function

Murmur32 hash is implemented in uniform_hash in hash.cc. It takes a string and a seed and return uint64_t.

There are two hash modes specified by --hash option.

Strings mode (hashstring in parse_primitives.cc)