Skip to content

Instantly share code, notes, and snippets.

View thimslugga's full-sized avatar
:octocat:

Adam Kaminski thimslugga

:octocat:
View GitHub Profile

A curated list of shell commands and tools specific to OS X.

“You don’t have to know everything. You simply need to know where to find it when necessary.” (John Brunner)

Awesome Gitter

For more terminal shell goodness, please also see this list's sister list Awesome Command Line Apps.

@thimslugga
thimslugga / cmd.origin.sh
Created May 8, 2025 15:08 — forked from 166MMX/cmd.origin.sh
macOS Sierra /usr/bin/ Origin
#!/usr/bin/env bash
main() {
header
find "$1" \( -type f -o -type l \) -print0 | while IFS= read -r -d ''; do
second "$REPLY"
done
}
second() {
@thimslugga
thimslugga / justfile
Last active May 8, 2025 13:07 — forked from raspberrypisig/justfile
A justfile template
#!/usr/bin/env just --justfile
# -*- mode: justfile -*-
# https://just.systems/man/en/introduction.html
# ==============================================================================
# Settings
# ==============================================================================
# Enable unstable features
@thimslugga
thimslugga / ebs-troubleshooting.md
Created April 17, 2025 13:25
EBS Troubleshooting

EBS Troubleshooting

Common symptoms of storage performance related issues:

  • Application is slow in completing work
  • Performance issues present with high levels of disk io -- including iops and throughput (latency:await) issues.
  • The %iowait is high and/or %system is high (if using LUKs encryption on storage).

Troubleshooting:

@thimslugga
thimslugga / sec_context.py
Created March 27, 2025 06:11 — forked from pudquick/sec_context.py
Check Security context flags
from ctypes import CDLL, byref, c_uint32
Security = CDLL('/System/Library/Frameworks/Security.framework/Versions/Current/Security')
kcallerSecuritySession = c_uint32(-1)
my_session = c_uint32(0)
session_bits = c_uint32(0)
result = Security.SessionGetInfo(kcallerSecuritySession, byref(my_session), byref(session_bits))
flags = session_bits.value
#!/bin/bash
VER="0.94.2";
SCRIPTTITLE="PV - HVM - version $VER";
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
NORMAL=$(tput sgr0)
# Configure logging
tmp="/tmp"
logfile="$tmp/$(basename $0).$$.log"
AWSTemplateFormatVersion: '2010-09-09'
Description: Extreme Performance Tuning Benchmark Environment
Parameters:
AmiId:
Type: AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>
Default: '/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2'
@thimslugga
thimslugga / Containerfile
Last active May 3, 2025 02:29 — forked from toriato/!README.md
Podman Quadlet Example
FROM php:8.2-fpm-alpine
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN \
chmod +x /usr/local/bin/install-php-extensions \
&& install-php-extensions \
apcu bcmath bz2 ldap pdo_mysql pdo_pgsql exif sysvsem smbclient intl imap pcntl soap imagick gmp gd zip
@thimslugga
thimslugga / build-kernel.sh
Last active May 3, 2025 02:28
Build Custom Amazon Linux 2023 Kernel from Source
#!/bin/bash
set -e
# https://github.com/orgs/amazonlinux/repositories
# https://github.com/amzn/amzn-drivers/issues/241#issuecomment-1282274014
# https://www.artembutusov.com/how-to-rebuild-amazon-linux-kernel-in-amazon-linux
# https://docs.aws.amazon.com/linux/al2023/ug/kernel-hardening.html
# https://kspp.github.io/
# https://github.com/a13xp0p0v/linux-kernel-defence-map
#https://github.com/a13xp0p0v/kernel-hardening-checker/