Skip to content

Instantly share code, notes, and snippets.

View jondkelley's full-sized avatar
:octocat:

Jonathan D Kelley jondkelley

:octocat:
View GitHub Profile
@jondkelley
jondkelley / guide.md
Last active September 3, 2025 01:57
Running Multiple Independent Kimai Instances with Docker

Running Multiple Independent Kimai Instances with Docker

This guide explains how to run multiple productive Kimai instances using Docker. In this example, files are created in /opt/kimai-mydomain. The folder name is not critical, but using descriptive names helps distinguish different instances.


@jondkelley
jondkelley / Monitor.cpp
Created July 30, 2025 12:15
Esp32 Voltage monitor to influx
#include <WiFi.h>
#include <HTTPClient.h>
#include <time.h>
#include <esp_sleep.h>
const char* ssid = "your_ssid";
const char* password = "your_password";
const char* influx_url = "http://192.168.1.100:8086/api/v2/write?org=myorg&bucket=mybucket&precision=s";
const char* influx_token = "your_token";
@jondkelley
jondkelley / esp32-hearbeat.cpp
Created July 30, 2025 00:21
esp32-hearbeat.cpp
#include <Arduino.h>
void setup() {
// Initialize serial communication
Serial.begin(115200);
// Wait for serial to be ready
while (!Serial) {
delay(10);
}
@jondkelley
jondkelley / nes-roms-sorter.py
Created February 19, 2025 02:06
Organizes huge directory of ROM files into structured directories based on region and alphabetical ranges
#!/usr/bin/env python3
"""
(Copyleft) 2025 Jonathan D. Kelley
ROM Organizer Tool
==================
This script organizes ROM files into structured directories based on region
and alphabetical ranges. It supports recursive scanning, dry-run mode,
and automatic directory cleanup.
@jondkelley
jondkelley / __INSTALL_MINIKUBE.txt
Last active February 14, 2024 21:59
Flink on k8s Issue
kubectl apply -f flink-configuration-configmap.yaml
kubectl apply -f jobmanager-svc.yaml
kubectl apply -f jobmanager-session-deployment.yaml -f task-manager-session-deployment.yaml
@jondkelley
jondkelley / netstat without netstat.txt
Created May 10, 2022 22:25
netstat without netstat
awk 'function hextodec(str,ret,n,i,k,c){
ret = 0
n = length(str)
for (i = 1; i <= n; i++) {
c = tolower(substr(str, i, 1))
k = index("123456789abcdef", c)
ret = ret * 16 + k
}
return ret
}
@jondkelley
jondkelley / busy_box_non_root.yaml
Created April 7, 2022 14:16
busy box non root
# 1) Deploy the pod
#
# kubectl create -f busybox-non-root.yaml
#
# 2) Access the shell
#
# kubectl exec -ti busybox-1000 -- sh
#
# 3) from the shell run:
#
@jondkelley
jondkelley / gist:d47e3e5c238ad9864483f33ad1ad9428
Created June 17, 2021 15:37 — forked from methane/gist:2185380
Tornado Example: Delegating an blocking task to a worker thread pool from an asynchronous request handler
from time import sleep
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
from tornado.web import Application, asynchronous, RequestHandler
from multiprocessing.pool import ThreadPool
_workers = ThreadPool(10)
def run_background(func, callback, args=(), kwds={}):
def _callback(result):
gunicorn run:app --workers=9
gunicorn run:app --workers=9 --worker-class=meinheld.gmeinheld.MeinheldWorker

Macbook Pro 2015 Python 3.7

Framework Server Req/s Max latency +/- Stdev
@jondkelley
jondkelley / cachepy_example.py
Last active December 15, 2020 20:25
Caching from serialized file example
# pip3 install cachepy
# https://github.com/scidam/cachepy
import time # used to simulate heavy CPU penalty
from cachepy import FileCache
from os.path import expanduser
from os import environ
import warnings