Skip to content

Instantly share code, notes, and snippets.

@zsteinkamp
zsteinkamp / gist:fcab16ced1a3fd635677a181234d7acb
Created December 20, 2024 16:03
.gitconfig to show diffs for Max for Live device files
[diff "amxd"]
textconv = awk '(NR>1)'
binary = true
@zsteinkamp
zsteinkamp / gist:af3ac1cb4b0cbe4cf53b7e836fbba113
Created November 30, 2024 02:43
Live Theme API Color Names
Generated by:
```
cd /Applications/Ableton\ Live\ 12\ Suite.app/Contents/App-Resources/Max/Max.app/Contents/Resources/C74/interfaces/themes
grep '"id"' *.maxtheme | grep live_ | cut -d '"' -f 4 | sort | uniq
```
live_active_automation
live_alert
live_arranger_grid_tiles
live_assignment_text_bg
@zsteinkamp
zsteinkamp / dockerscript
Last active February 21, 2026 11:39
A single bash script that bootstraps a container, then runs itself inside that container. Use any "FROM" line. The only requirement is that /bin/bash is present. See also [Turdokken](https://github.com/zsteinkamp/turdokken).
#!/bin/bash
# Shell code to run in the container
cmd () {
echo "Hello, ${OUTER_USER}. I am $(whoami)."
cat /etc/issue
}
# Dockerfile definition
read -r -d '' DOCKERFILE <<EOD
@zsteinkamp
zsteinkamp / git_prompt.bash
Created January 14, 2015 20:48
Bash Script to assemble a prompt that indicates user, host, directory, current branch, repo state.
# Configure colors
c_reset='\[\e[0m\]'
c_user='\[\e[1;33m\]'
c_path='\[\e[0;32m\]'
c_git_clean='\[\e[0;36m\]'
c_git_dirty='\[\e[0;31m\]'
# Function to assemble the Git part of our prompt.
git_prompt ()
{
@zsteinkamp
zsteinkamp / git_push_branch.bash
Last active August 29, 2015 14:07
Push current branch to a GitHub remote then open the GitHub compare page
# Push the current branch to a remote with the same branch name then open the
# github page comparing that branch to open a pull request.
# Additional args that are passed to this function are given to the "git push" command.
gpb ()
{
remote=$1
shift
if [ -z $remote ]; then
echo "ERROR: you must specify a remote name"