Skip to content

Instantly share code, notes, and snippets.

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

xero harrison xero

πŸ’­
πŸ’Ύ
View GitHub Profile
$ bun run build && vitest run
$ tsup src/index.ts --dts --format cjs,esm --out-dir dist
CLI Building entry: src/index.ts
CLI Using tsconfig: tsconfig.json
CLI tsup v8.5.0
CLI Target: es2020
CJS Build start
ESM Build start
ESM dist/index.js 6.50 KB
ESM Γ’ΒšΔ„ΔΒΈΒ Build success in 58ms
@xero
xero / color-golf.js
Last active June 23, 2025 18:52
nodejs optimizer for html/css string/hex/rgba color code golf
#!/usr/bin/env node
const F=require('fs'),N=process.argv[2],O=N.replace(/(\.[^.]*)?$/,"-opt$1")
const M={
aliceblue:'#f0f8ff',antiquewhite:'#faebd7',aqua:'#0ff',aquamarine:'#7fffd4',azure:'#f0ffff',beige:'#f5f5dc',bisque:'#ffe4c4',black:'#000',blanchedalmond:'#ffebcd',blue:'#00f',blueviolet:'#8a2be2',brown:'#a52a2a',burlywood:'#deb887',cadetblue:'#5f9ea0',chartreuse:'#7fff00',chocolate:'#d2691e',coral:'#ff7f50',cornflowerblue:'#6495ed',cornsilk:'#fff8dc',crimson:'#dc143c',cyan:'#0ff',darkblue:'#00008b',darkcyan:'#008b8b',darkgoldenrod:'#b8860b',darkgray:'#a9a9a9',darkgreen:'#006400',darkgrey:'#a9a9a9',darkkhaki:'#bdb76b',darkmagenta:'#8b008b',darkolivegreen:'#556b2f',darkorange:'#ff8c00',darkorchid:'#9932cc',darkred:'#8b0000',darksalmon:'#e9967a',darkseagreen:'#8fbc8f',darkslateblue:'#483d8b',darkslategray:'#2f4f4f',darkslategrey:'#2f4f4f',darkturquoise:'#00ced1',darkviolet:'#9400d3',deeppink:'#ff1493',deepskyblue:'#00bfff',dimgray:'#696969',dimgrey:'#696969',dodgerblue:'#1e90ff',firebrick:'#b22222',floralwhi
@xero
xero / win98.css
Last active May 20, 2025 21:09
win98.css
@font-face{
font-family:"Pixelated MS Sans Serif";
src:url("/fonts/ms_sans_serif.woff") format("woff");
src:url("/fonts/ms_sans_serif.woff2") format("woff2");
font-weight:normal;
font-style:normal;
}
*,html{
font-family:"Pixelated MS Sans Serif", "Microsoft Sans Serif", "MS Sans Serif", Roboto, sans-serif;
font-weight:normal;
@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