Skip to content

Instantly share code, notes, and snippets.

View Gerst20051's full-sized avatar

Andrew Gerst Gerst20051

View GitHub Profile
@0xdevalias
0xdevalias / reverse-engineering-macos.md
Last active June 7, 2026 18:47
Some notes, tools, and techniques for reverse engineering macOS binaries
@Shubhang
Shubhang / music_visualizer.py
Created March 29, 2023 23:02
Visualizing Audio with Python: Music Visualizer using NumPy, Matplotlib, MoviePy, and PyDub | GitHub Gist
# Author: Shubhang, 2023
# Description: This Python script demonstrates how to visualize audio using NumPy, Matplotlib, and MoviePy.
# It reads an audio file in WAV format, converts the audio samples to a NumPy array,
# and creates a video animation from a plot of the audio samples.
# The resulting video file shows the amplitude of the audio samples over time.
import numpy as np
import matplotlib.pyplot as plt
@straker
straker / README.md
Last active January 30, 2026 18:26
Basic Block Dude HTML and JavaScript Game

ICE Out; Abolish ICE

Basic Block Dude HTML and JavaScript Game

This is a basic implementation of Block Dude, an old TI-83/4 Calculator game. It's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

@wiseman
wiseman / agent.py
Last active May 19, 2026 18:04
Langchain example: self-debugging
from io import StringIO
import sys
from typing import Dict, Optional
from langchain.agents import load_tools
from langchain.agents import initialize_agent
from langchain.agents.tools import Tool
from langchain.llms import OpenAI
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@pudquick
pudquick / brew.md
Last active April 25, 2026 07:41
Lightly "sandboxed" homebrew on macOS

brew is a bad neighbor

This isn't a guide about locking down homebrew so that it can't touch the rest of your system security-wise.

This guide doesn't fix the inherent security issues of a package management system that will literally yell at you if you try to do something about "huh, maybe it's not great my executables are writeable by my account without requiring authorization first".

But it absolutely is a guide about shoving it into its own little corner so that you can take it or leave it as you see fit, instead of just letting the project do what it likes like completely taking over permissions and ownership of a directory that might be in use by other software on your Mac and stomping all over their contents.

By following this guide you will:

  • Never have to run sudo to forcefully change permissions of some directory to be owned by your account
input=(73 foobar)
rg="^[+\-]{0,1}[0-9]+$"
for num in "${input[@]}"; do
(echo "${num//[^\-+0-9]/}" | grep -Eq $rg) \
&& echo "$num is a number" \
|| echo "$num is not a number";
nnum="-"$num
(echo "${nnum//[^\-+0-9]/}" | grep -Eq $rg) \
@johndturn
johndturn / launchd-for-services.md
Last active May 7, 2026 04:34
Overview of using launchd to set up services on a macOS machine.

launchd - Script Management in macOS

What is it?

  • Used on macOS for managing agents and daemons and can be used to run scripts at specified intervals
    • macOS's competitor to cron, along with other things
  • Runs Daemons and Agents

What is a Daemon?

@cweave
cweave / create_sessions.scpt
Created March 24, 2022 03:53
Automating iTerm2 with Applescript
#!/usr/bin/osascript
tell application "iTerm2"
# Open window in full screen
tell application "System Events"
keystroke "f" using {control down, command down}
end tell
set serverSession to current session of current window
tell serverSession
@blopa
blopa / how-to-get-the-redux-state-from-a-production-build-via-the-browser's-console-script-2.js
Last active April 2, 2025 20:50
Code for post "How to get the Redux State from a production build via the browser's console"
// Traverse a dom element
const stores = new Set();
const traverse = (element) => {
let store =
element?.memoizedState?.element?.props?.store
|| element?.pendingProps?.store
|| element?.stateNode?.store;
if (store) {
stores.add(store);