Skip to content

Instantly share code, notes, and snippets.

@jftuga
jftuga / Mikrotik_Network_Config.md
Created December 28, 2025 13:11
Mikrotik Network Config

Mikrotik Network Config

Port Configs

  • 1 WAN
  • 2 Mgmt - 192.168.88.1
  • 3 - Multi WAN 1
  • 4 - Multi WAN 2
  • 5-8 Bridge with POE enabled
@jftuga
jftuga / ghostty_config
Last active December 25, 2025 13:35
ghostty config for MacOS
background = #000000
clipboard-trim-trailing-spaces = true
clipboard-paste-protection = false
copy-on-select = clipboard
cursor-click-to-move = true
cursor-style = block
cursor-style-blink = false
font-family = "SF Mono"
font-size = 18
font-thicken = true
@jftuga
jftuga / Markdown_Note_How_To.md
Last active September 29, 2025 06:23
Markdown Note How To

Outside of Note

Note

This is an inlined note. It has automatic line wrapping. It has automatic line wrapping. It has automatic line wrapping. It has automatic line wrapping.

Outside of Note

Note

This inlined note has >

@jftuga
jftuga / npm_npx_cheat_sheet.md
Last active August 19, 2025 15:45
npm + npx Cheat Sheet

📦 npm + npx Cheat Sheet

A quick reference for common npm and npx commands.


🔍 Checking Versions

npm -v          # Show npm version
node -v # Show Node.js version
@jftuga
jftuga / chomp.c
Created June 2, 2025 21:34
chomp
/*
* A C implementation that mimics Perl's 'chomp' functionality.
* Reads from standard input and outputs all characters except the trailing newline.
* Preserves internal newlines but removes only the final newline if present.
* Compile with: gcc -O2 -o chomp chomp.c
*/
#include <stdio.h>
int main(void) {
@jftuga
jftuga / README.md
Last active September 26, 2025 19:10
whisper.cpp on MacOS
@jftuga
jftuga / https-server.sh
Last active April 30, 2025 22:20
https server
#!/bin/bash
# https-server
# 2025-04-30
#
# This script starts a one-off HTTPS server using OpenSSL.
# It generates a temporary self-signed SSL certificate and private key,
# then uses OpenSSL's s_server command to serve files from the current directory
# over an encrypted HTTPS connection on port 4443.
#
# The script also handles cleanup:
@jftuga
jftuga / python-logging.py
Created February 22, 2025 19:46
Python Logging
# python logging for AWS Lambda function
import logging
# boto3 internally uses DEBUG and INFO; therefore start with WARNING level
logging.basicConfig(level=logging.WARNING)
def lambda_handler(event, context):
logging.warning(f"{event=}")
@jftuga
jftuga / SingleFile_Extension.md
Created February 18, 2025 01:05
SingleFile_Extension

Open SingleFile extension preferences...

For the File Name field use this:

SingleFile/%if-empty<%replace<{page-title}| |_>|no_title>--{year-locale}{month-locale}{day-locale}.{hours-locale}{minutes-locale}{seconds-locale}.{filename-extension}

Example file (uses local time):

@jftuga
jftuga / batt-info.sh
Created October 17, 2024 11:44
batt-info
# to be placed in .zshrc or .bashrc on MacOS
function batt-info() {
echo
system_profiler SPPowerDataType | grep Wattage | cut -c 7-
echo
pmset -g batt
}