Skip to content

Instantly share code, notes, and snippets.

@makew0rld
makew0rld / uxn.yaml
Last active August 27, 2021 23:23
Micro syntax for uxntal
filetype: uxntal
detect:
filename: "\\.(tal|uxn|uxntal|inc)$"
rules:
- identifier: "[@,;.&][^\ \n\r]+"
- constant: "[\"#'|$][^\ \n\r]+"
- statement: "\\b(BRK|LIT|INC|POP|DUP|NIP|SWP|OVR|ROT|EQU|NEQ|GTH|LTH|JMP|JCN|JSR|STH|LDZ|STZ|LDR|STR|LDA|STA|DEI|DEO|ADD|SUB|MUL|DIV|AND|ORA|EOR|SFT)[2rk]{0,3}\\b"
- comment:
@makew0rld
makew0rld / unms_exporter.py
Last active August 4, 2020 20:36
Ubiquiti UNMS exporter for Prometheus
# This file is now living in a repo:
# https://github.com/tomeshnet/toronto-community-network/tree/master/network/scripts/unms_exporter
# See the file revisions for history.
@makew0rld
makew0rld / go-build-all.sh
Last active April 26, 2024 09:51
Cross compile for all possible Golang targets. This script will always be updated, because it uses the `go` command to see what can be built.
#!/usr/bin/env bash
# Based on https://gist.github.com/eduncan911/68775dba9d3c028181e4
# but improved to use the `go` command so it never goes out of date.
type setopt >/dev/null 2>&1
contains() {
# Source: https://stackoverflow.com/a/8063398/7361270
[[ $1 =~ (^|[[:space:]])$2($|[[:space:]]) ]]
@makew0rld
makew0rld / skin_mask.py
Created March 19, 2020 17:15
OpenCV Python skin detection algorithm from the paper "RGB-H-CbCr Skin Colour Model for Human Face Detection"
# Algorithm from: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.718.1964&rep=rep1&type=pdf
# Archived version: https://archive.org/download/10.1.1.718.1964/10.1.1.718.1964.pdf
# Very similar (a copy?) of https://arxiv.org/pdf/1708.02694.pdf
import cv2
import numpy as np
@makew0rld
makew0rld / Unified.js
Created December 8, 2019 16:34
Taken from my HP Envy 4520 printer's webpage, at <IP>/framework/Unified.js - then formatted
This file has been truncated, but you can view the full file.
/*! (C) Copyright 2010, Hewlett Packard. All Rights Reserved. */ ;
if (typeof frameWorkObj === "undefined") {
frameWorkObj = {}
}
frameWorkObj.loadCss = function(a) {
document.writeln("<link href='" + a + "' rel='stylesheet' type='text/css' />")
};
frameWorkObj.loadScript = function(a) {
document.writeln("<script src='" + a + "' type='text/javascript'><\/script>")
};
@makew0rld
makew0rld / node-dreams.md
Last active February 23, 2019 17:22
Node dreams backup before sharing

Node dreams 💻💭

To acheive the dream below

  • A lot of UI work is needed
    • Web design
    • Hank?
  • Existing technology needs to be improved to work in a mesh environment
    • IPFS, SSB, etc
    • Either hacks on our side or us submitting PRs to their repo
  • Deployment and outreach needs to happen above all else