Skip to content

Instantly share code, notes, and snippets.

@ThaddeusJiang
Created July 27, 2023 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThaddeusJiang/343a378f8638f699e1ef2cb03f3e6db6 to your computer and use it in GitHub Desktop.
Save ThaddeusJiang/343a378f8638f699e1ef2cb03f3e6db6 to your computer and use it in GitHub Desktop.
bbin notes-submit

Install

bbin install notes-submit.clj

Usge

cd <your-git-repo>
notes-submit
#!/usr/bin/env bb
(require '[clojure.java.shell :refer [sh]])
(defn today [] (.format (java.text.SimpleDateFormat. "yyyy-MM-dd") (new java.util.Date)))
(defn submit []
(sh "git" "add" ".")
(sh "git" "commit" "-m" (str "Updated " (today)))
:out
(sh "git" "push"))
(submit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment