Skip to content

Instantly share code, notes, and snippets.

View marissamarym's full-sized avatar

Marissa Montgomery marissamarym

View GitHub Profile
@marissamarym
marissamarym / commitm.zsh
Last active February 17, 2024 16:58
AI Git Commit Message Generator
commitm() {
local system_prompt='Based on these changes, suggest a concise commit message, ideally less than 5 words:'
local execute_commit=false
local git_output_temp_file=$(mktemp)
local commit_message_temp_file=$(mktemp)
local cleaned_up=false # Flag to indicate whether cleanup has been run
# Check for the execute flag (-e)
if [[ "$1" == "--execute" ]] || [[ "$1" == "-e" ]]; then
execute_commit=true
@montasaurus
montasaurus / llmc.sh
Last active April 20, 2024 21:32
AI Shell Command Generator
llmc() {
local system_prompt='Output a command that I can run in a ZSH terminal on macOS to accomplish the following task. Try to make the command self-documenting, using the long version of flags where possible. Output the command first enclosed in a "```zsh" codeblock followed by a concise explanation of how it accomplishes it.'
local temp_file=$(mktemp)
local capturing=true
local command_buffer=""
local first_line=true
local cleaned_up=false # Flag to indicate whether cleanup has been run
cleanup() {
# Only run cleanup if it hasn't been done yet
@ollieglass
ollieglass / kelly_colors.py
Last active January 16, 2024 17:31
Kenneth Kelly's 22 colors of maximum contrast
# theory - https://eleanormaclure.files.wordpress.com/2011/03/colour-coding.pdf (page 5)
# kelly's colors - https://i.kinja-img.com/gawker-media/image/upload/1015680494325093012.JPG
# hex values - http://hackerspace.kinja.com/iscc-nbs-number-hex-r-g-b-263-f2f3f4-242-243-244-267-22-1665795040
kelly_colors = ['F2F3F4', '222222', 'F3C300', '875692', 'F38400', 'A1CAF1', 'BE0032', 'C2B280', '848482', '008856', 'E68FAC', '0067A5', 'F99379', '604E97', 'F6A600', 'B3446C', 'DCD300', '882D17', '8DB600', '654522', 'E25822', '2B3D26']