Skip to content

Instantly share code, notes, and snippets.

@HarryWang29
HarryWang29 / ChinaBroadnet.cookie.js
Last active October 10, 2025 11:28
ChinaBroadnet
@HarryWang29
HarryWang29 / add_to_zshrc.sh
Last active November 2, 2024 11:23 — forked from karpathy/add_to_zshrc.sh
Git Commit Message AI
# -----------------------------------------------------------------------------
# AI-powered Git Commit Function
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It:
# 1) gets the current staged changed diff
# 2) sends them to an LLM to write the git commit message
# 3) allows you to easily accept, edit, regenerate, cancel
# But - just read and edit the code however you like
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/
gcm() {
package main
import (
"bytes"
"fmt"
"github.com/huandu/go-tls"
"github.com/sirupsen/logrus"
"strconv"
"strings"
"time"