Skip to content

Instantly share code, notes, and snippets.

@nstgc
nstgc / peg-exercises.janet
Created November 11, 2022 00:27 — forked from sogaiu/peg-exercises.janet
janet peg exercises
# find * and + to be confusing, trying to use sequence and choice instead
(def peg-simple
~{:main (capture (some :S))})
(peg/match peg-simple "hello") # => @["hello"]
# from:
# https://janet-lang.org/docs/peg.html
(defn finder
@nstgc
nstgc / 00_script.clj
Created September 22, 2022 02:36 — forked from ericnormand/00_script.clj
Boilerplate for running Clojure as a shebang script
#!/bin/sh
#_(
#_DEPS is same format as deps.edn. Multiline is okay.
DEPS='
{:deps {clj-time {:mvn/version "0.14.2"}}}
'
#_You can put other options here
OPTS='
@nstgc
nstgc / convert.sh
Created August 30, 2022 17:14 — forked from zengxinhui/convert2arch_x64.sh
Replace Oracle Cloud Linux with Arch Linux remotely
Refs:
1. http://mirror.cs.pitt.edu/archlinux/iso/2021.02.01/archlinux-bootstrap-2021.02.01-x86_64.tar.gz
2. https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/x86_64/alpine-virt-3.13.1-x86_64.iso
3. https://wiki.alpinelinux.org/wiki/Replacing_non-Alpine_Linux_with_Alpine_remotely
4. https://wiki.archlinux.org/index.php/installation_guide#Configure_the_system
Requirement:
Console access.
1. In Ubuntu