Skip to content

Instantly share code, notes, and snippets.

@jcytong
jcytong / add_to_zshrc.sh
Last active August 26, 2024 02: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 `gci` 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/
gci() {
@jcytong
jcytong / ui.cljs
Created June 3, 2021 02:44
Clojure TO—Clojure Beginners Chat
(ns demo.ui
(:require
[reagent.dom :as rdom]
[reagent.core :as r]))
(update [true false] 0 not)
(defn future-cell-state [cell neighbours]
(let [num-alive (count (filter true? neighbours))]

Keybase proof

I hereby claim:

  • I am jcytong on github.
  • I am johnnytong (https://keybase.io/johnnytong) on keybase.
  • I have a public key ASCAJAY3qDuQKplLgUAtTVf4fuBxXU5TFSrdxzL-ATKU-Ao

To claim this, I am signing this object:

@jcytong
jcytong / gist:9d105bbd88fd0a306601
Created November 13, 2014 05:39
Onename proof
Verifying that +johnnytong is my openname (Bitcoin username). https://onename.io/johnnytong