Skip to content

Instantly share code, notes, and snippets.

View bmatusiak's full-sized avatar
☯️
Life

Bradley Matusiak bmatusiak

☯️
Life
View GitHub Profile
@bmatusiak
bmatusiak / feature-catalog.json
Last active September 13, 2026 18:44
feature map
{
"0": { "name": "Bluetooth LE", "category": "Connectivity", "description": "Low-energy Bluetooth communication" },
"1": { "name": "AES-256 Hardware Encryption", "category": "Security", "description": "Hardware-accelerated cryptography engine" },
"2": { "name": "OTA Firmware Updates", "category": "System", "description": "Over-the-air firmware flashing capability" },
"3": { "name": "CAN Bus Telemetry", "category": "Hardware", "description": "Direct vehicle CAN interface logging" },
"4": { "name": "Secure Bootloader", "category": "Security", "description": "Cryptographically verified boot sequence" }
}
@bmatusiak
bmatusiak / d2rcmdline
Created April 4, 2026 15:41 — forked from heinermann/d2rcmdline
D2R Command Line Options
-w, -window, -windowed Run in windowed mode.
-per ??
-lq Runs game using low quality/low vision mode; same as Large Font Mode setting.
-gamma <num> Override Gamma. Default: 0
-vsync <num> Override VSync. Default: 255
-aftermath <string> ?? 23 chars max. Default: unset
-s <string> ?? 23 chars max. Default: unset
-gametype <num> ?? Default: 0
-arena <num> ?? Default: 0
-joinid <num> ?? Default: 1
@bmatusiak
bmatusiak / index.js
Last active December 21, 2025 03:01
gen-onion
const { generateKeyPairSync, createHash, getHashes } = require('crypto');
function rawPublicKeyFromSpki(spkiDer) {
// For ed25519 SPKI, the raw public key is the last 32 bytes
return Buffer.from(spkiDer.slice(-32));
}
function sha3_256(buf) {
const hashes = getHashes();
if (!hashes.includes('sha3-256')) {
#!/usr/bin/env bash
set -euo pipefail
SESSION="${EXPO_TMUX_SESSION:-expo-dev}"
CMD="${EXPO_CMD:-npx expo start --dev-client}"
usage() {
cat <<EOF
Usage: $(basename "$0") [--bg|-d] [--help|-h]
/*
Garage Door and Light Control with ESP32_Relay 4 - Conversation Summary:
This code implements a garage door and light control system using an ESP32_Relay 4 board.
It includes:
1. WiFi Connectivity: The ESP32 hosts a web server to control the garage door and light via a web interface.
2. Garage Door Control:
* Uses two relays to control the motor direction.
* Limit switches to stop the motor when the door is fully open or closed.
@bmatusiak
bmatusiak / facebook-friend-remover.js
Created November 2, 2024 16:44
facebook-friend-remover.js
console.log("ok")
window.startRemover = function(){
setTimeout(function() {
$('[aria-label="Friends"]')[0].scrollIntoView();
$('[aria-label="Friends"]')[0].click()
setTimeout(function() {
$('[role="menu"]').find("span").last().click()
function emptyLoad(target){
function lookup(){
if (ready) ready = false;
target.once((data) => {
if (data) {
clearInterval(checkInterval);
}else{
ready = true;
lookup()
}
@bmatusiak
bmatusiak / uds.js
Last active August 30, 2023 11:19
gun uds Unix_domain_socket
const net = require('net');
const path = require('path');
const fs = require('fs');
var listen_path = path.join(process.cwd(), 'gun_sockets');
if (!fs.existsSync(listen_path)) {
fs.mkdirSync(listen_path);
}
listen_path = path.join(listen_path, 'gun.socket');
@bmatusiak
bmatusiak / basic-uds-net.js
Created August 29, 2023 20:25
basic-uds-net.js
const net = require('net');
const path = require('path');
var listen_path = path.join(process.cwd(), 'nodejs.socket');
if (process.platform.indexOf("win") > -1)
listen_path = path.join('\\\\?\\pipe', process.cwd(), 'nodejs.socket');
module.exports = {
server: function () {
@bmatusiak
bmatusiak / DynamoDB.js
Last active August 26, 2023 16:36
gun DynamoDB store
var Gun = require('gun/gun');
Gun.on('create', function lg(root) {
this.to.next(root);
const CyclicDb = require("@cyclic.sh/dynamodb")
const db = CyclicDb(process.env.CYCLIC_DB);
const COLLECTION = "gun2";
const collection = db.collection(COLLECTION);