Skip to content

Instantly share code, notes, and snippets.

View thimslugga's full-sized avatar
:octocat:

Adam Kaminski thimslugga

:octocat:
View GitHub Profile
@thimslugga
thimslugga / GitCheatsheet.md
Last active July 1, 2025 15:25
Git Cheatsheet

Git Cheatsheet

Git Setup

Configure Git (Note: This is a one-time setup.):

mkdir -p ~/.config/git
touch ~/.config/git/config
@thimslugga
thimslugga / Containerfile
Created June 18, 2025 10:32
Amazon Linux 2023 Minimal Container Image
# syntax=docker/dockerfile:1
FROM public.ecr.aws/amazonlinux/amazonlinux:2023 as build
RUN \
set -ex ; \
sed -i '/tsflags=nodocs/d' /etc/dnf/dnf.conf ; \
dnf --releasever=$(rpm -q system-release --qf '%{VERSION}') \
-y \
--allowerasing \
--setopt=install_weak_deps=False \
@thimslugga
thimslugga / pyproject.toml
Created June 3, 2025 12:30 — forked from cfbevan/pyproject.toml
Full Ruff settings for pyproject
[project]
name = "tool_testing"
version = "0.1.0"
description = "Ruff Tested Project"
authors = [{ name = "", email = "" }]
dependencies = []
requires-python = "==3.11.*"
readme = "README.md"
license = { text = "MIT" }
@thimslugga
thimslugga / mkosi.conf
Created May 19, 2025 05:17 — forked from jfroy/mkosi.conf
rescue-os
[Distribution]
Distribution=arch
[Content]
Autologin=true
Bootloader=none
KernelCommandLine=rw
Keymap=us
Locale=en_US.UTF-8
MakeInitrd=no
@thimslugga
thimslugga / get_docker_run.sh
Last active May 8, 2025 20:31
Get docker run for a container name or ID
#!/bin/bash
set -euo pipefail
# ./get_docker_run.sh c56975e847b4
# docker run -d -e "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -v /root:/data public.ecr.aws/docker/library/amazonlinux:2023 /bin/bash
if [[ "$#" -ne 1 ]]; then
echo "Usage: $0 <container_name_or_id>"
exit 1
fi
@thimslugga
thimslugga / sos.sh
Last active May 8, 2025 19:38
Poor Mans SOS Report
#!/bin/bash
#set -x
#set -o verbose
export LANG=C
SOS_OUTPUT_DIR="/tmp/sos"
"${ERROR_LOGFILE}"FILE="error.log"
[[ -d "${SOS_OUTPUT_DIR}" ]] && rm -rf "${SOS_OUTPUT_DIR}"
@thimslugga
thimslugga / build_app.sh
Created May 8, 2025 16:06 — forked from bistole/build_app.sh
archive, notarize and stapler
#!/bin/sh
CODE_BASE=/path/to/Storyboard
SCRIPT_PATH=$(dirname "$0")
DEPLOY_ROOT_PATH="${SCRIPT_PATH}/.."
LOG_PATH="${DEPLOY_ROOT_PATH}/logs"
BUILD_PATH="${DEPLOY_ROOT_PATH}/build/macos"
VERSION=
STATUS=
REQUEST_UUID=
@thimslugga
thimslugga / README.md
Created May 8, 2025 16:05 — forked from riaf/README.md
Script to manually apply your shell PATH to macOS GUI apps. Fixes issues finding Homebrew/custom tools via launchd & launchctl setenv.

Sync Your Shell PATH to macOS GUI Apps Manually with This Script

The Problem

Are you struggling with macOS GUI applications (like IDEs, text editors, or other tools launched from Finder or Spotlight) not finding command-line tools installed via Homebrew (/opt/homebrew/bin), MacPorts, or in custom directories like ~/bin or /usr/local/bin? This happens because GUI applications on macOS do not automatically inherit the PATH environment variable set by your login shell configuration files (like .zshenv, .zprofile, .bash_profile, or .bashrc). Your carefully configured shell PATH works in the Terminal, but GUI apps remain unaware of it.

The Solution

This Bash script provides a simple, manual way to apply the PATH from your current Terminal session to the macOS GUI environment. Instead of complex automatic synchronization, you run this script whenever you want to update the PATH that GUI applications will use.

macOS interesting tools

many are discovered by scouring the manpages apropos -s 1/8/? .

  • nettop
  • nscurl
  • (arp)
  • textutil
  • wish, tcl/tk etc.
  • last
@thimslugga
thimslugga / 01-mac-profiling.md
Created May 8, 2025 15:08 — forked from loderunner/01-mac-profiling.md
Profiling an application in Mac OS X

Profiling an application in Mac OS X

Finding which process to profile

If your system is running slowly, perhaps a process is using too much CPU time and won't let other processes run smoothly. To find out which processes are taking up a lot of CPU time, you can use Apple's Activity Monitor.

The CPU pane shows how processes are affecting CPU (processor) activity: