Skip to content

Instantly share code, notes, and snippets.

View CodeMan99's full-sized avatar

Cody A. Taylor CodeMan99

View GitHub Profile
@CodeMan99
CodeMan99 / log-request.js
Last active November 19, 2024 19:39
JSON request debugging server
const http = require('http');
const server = http.createServer(async function(req, res) {
const buffers = [];
for await (const data of req) {
buffers.push(data);
}
let body = null;
if (buffers.length > 0) {
@CodeMan99
CodeMan99 / devcontainer.json
Created February 20, 2025 05:29
Kotlin using VS Code via a Devcontainer
{
"name": "Debian",
"image": "mcr.microsoft.com/devcontainers/base:bookworm",
"customizations": {
"vscode": {
"extensions": [
"fwcd.kotlin",
"vscjava.vscode-java-pack"
]
}
@CodeMan99
CodeMan99 / watch.sh
Created March 18, 2025 12:57
Bash implementation of `watch`
#!/usr/bin/env bash
#
# Usage: watch.sh "<command>" [interval]
# https://stackoverflow.com/questions/9574089/os-x-bash-watch-command
pid=$$
command="$1"
# default interval of 2 seconds
interval="${2:-2}"