Skip to content

Instantly share code, notes, and snippets.

View xero's full-sized avatar
💾

xero harrison xero

💾
View GitHub Profile
@font-face {
font-family: topazplus;
font-weight: normal;
font-style: normal;
font-display: swap;
src: url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAABeMAA8AAAAAU0AAABcqAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GYACDAggEEQgK+BDaBAE2AiQDhwQLg0QABCAFligHhhI/d2ViZgYbaUEVbNxFdjsCIUm9QRQlavUZIqpG4ez/T8mNMbQGyP5CVSchcpAJUmTzIEVjJBcim3ecxmQNrfnYko2E0/jBd0EL4fa3IV64Ufkb6/Rsuevix7AEJFQo8mEHs/qBSDXUGdw9lCDh+Wd/1H1fHphpIiNPZ5tJMxHgqkFMmzYUwKFpYs1tHl/cJ94WIs2sUVcxb6aRROWIYiUToXEwrpqDUnBaMAk6SHohUnX137QUIClKAj6lcWo/Hu1MNtteduzItWlI8P2a7vv/LpOzESopGFcjgGQVojBVFYZZRZbQ2gb+y731ttOgQcsGbTvEJ2SAFhBjNZ9rwH+g5roICjkOc9AxoC4XF9/XAQD1/AOg/7Xrz6vTeYQSujCLBCk7RMTTWzNd71OV2+WfhhwX3b+PohFGGE+M5LHlx5Cyy/8traSx7zIMySkjA5YfN2Oq/39Vubuq1Cu1erRSS7PWaDTrWc0GpQ2xqlu7r2c04xAvpMCcL6TADi5zwikgQxgRMIAG2Mgcmoe3m97BxxN8IHJbC1qWBK15LklCt+AWxRZwy+i61Qvh6JUfw5haR9I3q7b66VieEkREREREQCHm9kkBBPAov+0JgIc9ll8AnkwIEPLAA4lyKIR4hxvt/WpAzTmO4EUrerWoHBQvgY7YnlDoFaBQQaR42sEhKZsB9957vwCQkQ+R1u7MZguUTp9uM86jeuR0Jb2AeKCiL0/t8E2r0sXlfxdMT
$ 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