Skip to content

Instantly share code, notes, and snippets.

View xero's full-sized avatar
πŸ’­
πŸ’Ύ

xero harrison xero

πŸ’­
πŸ’Ύ
View GitHub Profile
@xero
xero / 386.js
Last active May 6, 2025 04:40
self contained classic BBS style page loading animation
// modified bbs loading animation from bootstrap 386
// https://github.com/kristopolous/BOOTSTRA.386
// view it in action at https://0w.nz
document.addEventListener("DOMContentLoaded", function () {
$ = function $(selector, context = document) {
return Array.from(context.querySelectorAll(selector));
};
_ = function _(action, obj, parent = document.body) {
action == "add" ? parent.appendChild(obj) : parent.removeChild(obj);
@xero
xero / ansi.sh
Last active March 13, 2025 06:55
display ansi art in your terminal - a CP437 to UTF-8 converter
#!/bin/bash
# ansi art converter
help() {
echo "Usage: $0 <path-to-ans-file>"
echo "Example: $0 ~/docs/ansi/x0-krad.ans"
exit 1
}
deps() {
local dependencies=("iconv" "awk" "perl")
@xero
xero / hopeless
Last active March 14, 2025 22:42
dante's infernal motd ansi art
#!/bin/bash
cat << X0

/ \ β€Ύβ€Ύβ€Ύ β€Ύ___ β€Ύβ€Ύ β€Ύβ€Ύβ€Ύβ€Ύβ€Ύ β€Ύβ€Ύβ€Ύ β€Ύβ€Ύβ€Ύ β€Ύβ€Ύβ€Ύβ€Ύ\/β€Ύβ€Ύβ€Ύ β€Ύ β€Ύβ€Ύβ€Ύβ€Ύβ€Ύβ€Ύβ€Ύβ€Ύ\
( __| ( / \ / / _ |
\ ) | //--/ / _ _ __/ _ _ / \ / /  |
: // (_ /β€Ύ) (_\ / ) (_/ (_)/ ) //--/ / / |
x . _ β€Ύβ€Ύ // (_ / /  :
0 | ' ) / _ |
: | //--/ _ _ _ ' ) / _ |
@xero
xero / ALERT.md
Last active September 10, 2024 13:32

Epsongelion nerd fonts build workflow

apt install fontforge python3-fontforge curl
curl -sL "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FontPatcher.zip" -o fontpatcher
cd fontpatcher
@xero
xero / github-to-bare-repo-sync.sh
Last active July 3, 2024 02:31
sync github repos to bare repositories on a local machine, as well as multiple remote mirrors (run as a cron job!)
#!/bin/bash
#shellcheck disable=SC2164
#
# sync multiple github repos to bare repositories on
# a local machine, as well as multiple remote mirrors
#
# β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“
# β–‘β–“ author β–“ xero <[email protected]>
# β–‘β–“ code β–“ https://code.x-e.ro
# β–‘β–“ mirror β–“ https://github.com/xero
@xero
xero / awscurl
Last active August 17, 2023 15:25
curl script for aws rest api
#!/bin/sh
# shellcheck disable=SC2155,SC2001
VERSION="1.0.9"
DATE_CMD="date"
SED_CMD="sed"
# use gnu coreutils on macOS: brew install coreutils
if [ "$(uname)" = "Darwin" ]; then
@xero
xero / miasma.Xcolors
Created June 5, 2023 19:10
miasma β€œfall” colorscheme
// ┏┏┓o┳━┓┓━┓┏┏┓┳━┓
// ┃┃┃┃┃━┫┗━┓┃┃┃┃━┫
// β”› ┇┇┛ ┇━━┛┛ ┇┛ ┇
// miasma by xero (https://x-e.ro)
*.foreground: #c2c2b0
*.background: #222222
*.cursorColor: #5f875f
! black
*.color0: #222222
@xero
xero / getip
Last active May 6, 2025 03:48
aws ip miner
#!/bin/bash
# interactive aws elastic ip miner tool, get a cool aws ip!
# usage: AWS_PROFILE=dev AWS_REGION=us-east-2 ./getip
# CC0 xero | https://x-e.ro | https://github.com/xero
declare -g region='us-east-2' tmp=''
tmp="$(mktemp /tmp/getip.XXXXXXXXXX)" || { echo "failed creating temp file"; exit 1; }
[ -z "$AWS_REGION" ] || region="$AWS_REGION"
function requirements() {
@xero
xero / cidr
Last active May 24, 2023 16:39
CIDR - the CIDR block calc & cheatsheet
#!/bin/bash
# CIDR - the CIDR block calc & cheatsheet
# CC0 xero | https://x-e.ro | https://github.com/xero
usage() {
EXITCODE=0
if [ -n "$1" ] && [ "$1" -eq "$1" ] 2>/dev/null; then
EXITCODE=$1
fi
me="$(basename "$(test -L "$0" && readlink "$0" || echo "$0")")"
@xero
xero / yank
Created May 6, 2023 01:38
heinous edit of a yank script by samoshkin that tries to push to every clipboard it possibly can
#!/bin/bash
# heinous edit of a yank script by samoshkin
# https://github.com/samoshkin/tmux-config/blob/master/tmux/yank.sh
# tries to push to every clipboard it possibly can xD
set -eu
shopt -s extglob
installed() {
type "$1" &>/dev/null
}