Skip to content

Instantly share code, notes, and snippets.

View Surreal9's full-sized avatar

John Arnold Surreal9

  • Hypergiant
  • Canada
View GitHub Profile
@Surreal9
Surreal9 / setup.sh
Last active June 23, 2021 23:35
ubuntu 20.10 setup
sudo apt-get install -y tilix build-essential autoconf curl xclip chrome-gnome-shell git apt-transport-https
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
#curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
#echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
#sudo apt update && sudo apt install --no-install-recommends yarn
# Check out https://apt.syncthing.net/ probably has instructions like:
@Surreal9
Surreal9 / README.md
Last active September 23, 2021 15:26
Postgres WAL continuous archiving
@Surreal9
Surreal9 / .bashrc
Created January 12, 2023 01:47
npm run alias with autocomplete
alias nr="npm run"
_npm_scripts() {
# check package.json file in current directory
if [ ! -f ./package.json ]; then
return
fi
local scripts="$(node -e 'const { scripts } = require(`./package.json`); if (!scripts) process.exit(); let a = Object.entries(scripts); for (let s in scripts) { console.log(s); }' | grep -E ^$2)"
local -a toks