Skip to content

Instantly share code, notes, and snippets.

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