Skip to content

Instantly share code, notes, and snippets.

We couldn’t find that file to show.
@ko1nksm
ko1nksm / keycode.sh
Created December 25, 2021 06:59
Display key code
#!/bin/sh
set -euf
stty=$(stty -g)
trap 'stty "$stty"' EXIT
stty -echo -icanon
tpid=""
while :; do
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ko1nksm
ko1nksm / CGoL.sh
Last active February 3, 2023 12:15 — forked from ytaki0801/CGoL.sh
Conway's Game of Life in POSIX Shell
#!/bin/sh
xs=80 ys=35
ORIGIN=$(clear) LF='
'
xorshift32=$(date +%s)
xorshift32() {
set -- "$1" "$xorshift32"
set -- "$1" $(( $2 ^ (($2 << 13) & 0xFFFFFFFF) ))