Skip to content

Instantly share code, notes, and snippets.

View emanuele6's full-sized avatar
🐄

Emanuele Torre emanuele6

🐄
  • Provincia di Varese, Italy
  • 06:54 (UTC +02:00)
View GitHub Profile
@davidgiven
davidgiven / cpm.bas
Created May 31, 2023 21:43
This is a very barebones CP/M port for the Agon Light, using the BBC BASIC assembler to do all the work.
10 bbase=&FD00
20 fbase=bbase-3584
30 cbase=fbase-2048
40 iobyte=&0003
50 cdisk=&0004
60 bdoscall=&0005
70 bioscall=&0000
80 DIM code 4096
90 FOR pass=4 TO 7 STEP 3
100 P%=0
#!/usr/bin/env ksh
typeset -a FUNCNAME
function FUNCNAME.get {
nameref self=${.sh.name}
if (( .sh.subscript < .sh.level )); then
trap "(( .sh.level -= .sh.subscript + 1 )); eval '(( .sh.level = ${.sh.level} ))' \; _=\${.sh.fun}" DEBUG
trap - DEBUG;
fi
@ormaaj
ormaaj / pattest.py
Last active July 9, 2022 17:31
Shell pattern quote/escape fuzzer.
#!/usr/bin/env python3
import subprocess, itertools
class Shell(list):
def __init__(self, shell, cmds):
self.shell = shell
super().__init__([(x, self.__run(x)) for x in cmds])
def __iter__(self):