Skip to content

Instantly share code, notes, and snippets.

@krzyzanowskim
krzyzanowskim / .gitconfig
Last active February 4, 2025 21:45
commit-ai
[alias]
# need llm CLI: https://llm.datasette.io/en/stable/
# based on https://gist.github.com/karpathy/1dd0294ef9567971c1e4348a90d69285?permalink_comment_id=5167582#gistcomment-5167582
commit-ai = "!f() { if [ -n \"$(git diff --cached)\" ]; then git commit -m \"$(git diff --cached | llm -m '4o-mini' 'Below is a diff of all staged changes, coming from the command:\\n```\\ngit diff --cached\\n```\\nPlease generate a concise, two-sentence, maximum 100 characteres commit message for these changes. Do not mention project name.')\"; else echo 'No changes to commit'; fi }; f"
@dm-z
dm-z / Volume Mute
Created April 8, 2014 08:15
Mute/Unmute OS X system volume with AppleScript
set curVolume to get volume settings
if output muted of curVolume is false then
set volume with output muted
else
set volume without output muted
end if