Skip to content

Instantly share code, notes, and snippets.

@wojas
wojas / docker-ps-architectures.sh
Created September 2, 2022 06:52
Check which docker containers are running under qemu emulation on macOS
#!/bin/bash
# https://stackoverflow.com/questions/66834864/how-to-determine-when-docker-containers-on-an-m1-macbook-are-running-via-qemu
#for i in `docker ps --format "{{.Image}}"` ; do
# docker image inspect $i --format "$i -> {{.Architecture}} : {{.Os}}"
#done
OPT=$@
set -euo pipefail
docker container ls $OPT --format "{{.ID}}\t{{.Image}}\t{{.Command}}\t{{.Status}}\t{{.Names}}" |
@wojas
wojas / Dockerfile
Created October 30, 2025 15:01
Create a container with godu to inspect what is included in your docker context
FROM golang:1.20-alpine
ENV GOBIN /usr/local/bin
RUN go install github.com/viktomas/godu@latest
COPY / /context
WORKDIR /context
CMD ["/usr/local/bin/godu", "-l", "1", "/context"]
@wojas
wojas / README.md
Created November 13, 2025 13:46
macOS sound volume limiter for Hammerspoon

(The following description and code is generated by ChatGPT)

Here’s a drop-in volume limiter for Hammerspoon (open source macOS automation app using Lua) that enforces per-output-device max volume, and automatically follows the active output device.

Paste this into ~/.hammerspoon/init.lua (or a separate file and require it), then edit the config table at the top.

(see file below)

How to use