Skip to content

Instantly share code, notes, and snippets.

View davydmaker's full-sized avatar
🦀
da lama ao caos, do caos ao código

davyd davydmaker

🦀
da lama ao caos, do caos ao código
View GitHub Profile
@davydmaker
davydmaker / README.md
Created April 22, 2026 02:39
servo-motor-sizing: Python script to rank RC servo motors against control surface requirements

servo-motor-sizing

Python script that helps rank RC servo motors against control surface requirements (aileron, rudder, elevator, flaps, tailwheel). Reads a config file and writes a ranked comparison to result.txt.

How it works

The script reads conf.txt, which defines:

  • Surfaces (control surfaces with their minimum torque and weighting criteria).
  • Servos (candidate motors with their specifications).
@davydmaker
davydmaker / README.md
Created April 22, 2026 02:35
quick-certificates-jdk: shell script to bulk-import certificates into a JDK cacerts keystore (Windows)

quick-certificates-jdk

Shell script to facilitate bulk-importing certificates into a JDK's cacerts keystore. Designed for Windows environments using Git Bash, WSL, or Cygwin (calls keytool.exe with Windows-style paths).

When run, the script imports every .crt/.cer file from a configured directory into the cacerts of a configured JDK, using each filename as the alias and the default changeit password (configurable).

Configuration

Edit two variables at the top of the script:

@davydmaker
davydmaker / README.md
Created April 22, 2026 02:30
active-mq-artemis-utils: browser console scripts for Apache ActiveMQ Artemis 7 queue maintenance

active-mq-artemis-utils

Browser console scripts to streamline routine operational tasks on Apache ActiveMQ Artemis 7 (AMQ7) through the Broker Console web UI.

Scripts

  • clear-queue-artemis-amq7.js — clears and resets one or more queues (flushes executor, removes all messages, resets counters, clears duplicate ID cache, and resumes).
  • find-messages-limbo-artemis-amq7.js — identifies queues that have pending messages but zero consumers (messages stuck "in limbo").

Requirements

@davydmaker
davydmaker / README.md
Created April 22, 2026 02:25
generate-sql-migration: timestamped SQL migration file generator

generate-sql-migration

Shell script that generates SQL migration files with a timestamp prefix and a formatted name based on input arguments. Useful when Docker Compose runs SQL files at database boot in alphabetical order and you need guaranteed execution ordering.

Usage

chmod +x generate-sql-migration.sh
./generate-sql-migration.sh [names...]
@davydmaker
davydmaker / nintendo-switch-proxy.sh
Created January 6, 2026 02:09
Proxy server script for Nintendo Switch on macOS
#!/bin/bash
set -e
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
@davydmaker
davydmaker / boot.config
Created December 24, 2025 02:46
Valheim boot.config – Multiplayer optimization (MacBook Air M1)
gfx-threading-mode=4
gfx-enable-gfx-jobs=1
gfx-enable-native-gfx-jobs=1
disable-gfx-present-thread=1
job-worker-count=4
gc-max-time-slice=4
hdr-display-enabled=0
vr-enabled=0
@davydmaker
davydmaker / ligaMagicRemoveFromCartByPrice.js
Created December 4, 2025 14:36
Browser console script to automatically remove items from Liga Magic cart by exact price match. Auto-confirms native browser prompts.
/**
* Browser console script for Liga Magic website.
* Removes items from the cart by exact price match and auto-confirms native browser prompts.
*
* USAGE:
* 1. Open Liga Magic website in your browser
* 2. Open browser console (F12 or Cmd+Option+I)
* 3. Copy and paste this entire script
* 4. Call: ligaMagicRemoveFromCartByPrice({ targetPrice: 'R$ 10,00' })
*
@davydmaker
davydmaker / slack-deactivated-monitor.js
Created November 20, 2025 01:18
Monitor Slack users by extracting daily lists to track deactivated accounts and potential company terminations
// To obtain these values: open Slack web, monitor network requests after login,
// pick any API request, extract company workspace from URL (e.g., xpto.enterprise.slack.com),
// and find the token in the request payload (form data)
//
// To run this script: open Slack web in your browser and paste this script into the browser console
const SLACK_TOKEN =
"";
const COMPANY_WORKSPACE = "";
(async () => {
@davydmaker
davydmaker / directory_diff.py
Created September 23, 2025 00:07
Directory diff tool with interactive reporting and complete analysis
#!/usr/bin/env python3
"""
Script to recursively compare all files between two directories.
Generates text reports by default, with option for HTML format.
Usage:
python directory_diff.py <base> <compare> [-o output] [--format {text,html}]
Examples:
python directory_diff.py base compare # Text report (default)
@davydmaker
davydmaker / frame_selector_unique.gml
Created July 16, 2025 01:58
GameMaker GML: Unique Frame Selector System
/**
* Frame Selector System - Randomly selects frames without repetition
* Ensures each frame is used exactly once before any frame is repeated
*/
/**
* Creates a shuffled frame selector for the current sprite
*
* @return {struct} Frame selector object with methods
*