Skip to content

Instantly share code, notes, and snippets.

View xieyuheng's full-sized avatar

谢宇恒 / Xie Yuheng xieyuheng

View GitHub Profile
@bojidar-bg
bojidar-bg / Bin.i
Last active September 23, 2023 19:10
Binary type with addition and multiplication for interaction nets, https://inet.run/playground/
// Example usage:
// let bsix = b0(b1(b1(bend())))
// let nseven = add1(add1(add1(add1(add1(add1(add1(zero())))))))
// let bseven = ntob(nseven)
// eval @inspect(bmul(bsix, bseven)) // -> takes 75 steps; doing the same with Nat mul takes 123 steps
// Type defitinion
type Bin
@lilydjwg
lilydjwg / lxc-arch2
Last active April 9, 2024 16:34
lxc-arch2: a script to create a copy of my Arch Linux system in systemd-nspawn for testing
#!/bin/zsh -e
cd ~/tmpfs
mkdir -p .lxc-root .lxc-data/root/etc .lxc-work
sudo GDK_DPI_SCALE=$GDK_DPI_SCALE zsh -e - <<'EOF'
chown 0:0 .lxc-data/root .lxc-data/root/etc
modprobe overlay
mountpoint .lxc-root || mount -t overlay -o lowerdir=/,upperdir=$PWD/.lxc-data/root,workdir=$PWD/.lxc-root overlayfs $PWD/.lxc-root
@edokeh
edokeh / index.js
Last active May 12, 2024 05:54
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@paulp
paulp / The Signs of Soundness
Last active June 17, 2021 06:48
The Signs of Soundness
Hello scala, my old friend
I've come to take you home again
Because a feature slowly creeping
left me plagued with doubts and weeping
and the version that was tagged in the repo
just has to go
it lacks the signs of soundness
On sleepless nights I hacked alone
applying ant and other tools of stone
@ssokolow
ssokolow / .Xresources
Created May 1, 2011 15:54
.Xresources settings for more modern XTerm keybindings
! {{{ Quick Reference
!
! Scrolling:
! Scroll Wheel
! Shift-PgUp/PgDn
!
! Copy/Paste:
! Mouse-Select : Copy to PRIMARY
! Shift + Mouse-Select: Copy to CLIPBOARD
!