Gold Ayan's Tinker Garage

We can also name it Mini articles

2026

Add watchers for clojure agent/atom/var/ref reference <2026-02-02 Mon>

(def a (atom {}))

(add-watch a :watcher
           (fn [key atom old-state new-state]
             (prn "-- Atom Changed --")
             (prn "key" key)
             (prn "atom" atom)
             (prn "old-state" old-state)
             (prn "new-state" new-state)))

(reset! a {:foo "bar"})

;; "-- Atom Changed --"
;; "key" :watcher
;; "atom" #<Atom@4b020acf: {:foo "bar"}>
;; "old-state" {}
;; "new-state" {:foo "bar"}
;; {:foo "bar"}

Harper integration with Emacs for org mode [2026-01-28 Wed]

(with-eval-after-load 'eglot
  (add-to-list 'eglot-server-programs
               '(org-mode . ("harper-ls" "--stdio"))))

Ntfy notification from Emacs [2026-01-07 Wed]

  (defun my/ntfy-send (message &optional title priority tags)
  "Send a notification to ntfy.sh."
  (let* ((url-request-method "POST")
         (url-request-data (encode-coding-string message 'utf-8))
         (url-request-extra-headers
          `(("Title" . ,(or title "Emacs Alert"))
            ("Priority" . ,(or priority "3"))
            ("Tags" . ,(or tags "purple_circle"))))
         (topic "<TOPIC>") ;; -----------------------> Your topic here
         (url (concat "https://ntfy.sh/" topic))) ;; ------------> Official or selfhosted ntfy server url
    (url-retrieve url (lambda (status) (message "ntfy: Sent!")))))


(my/ntfy-send "Hello from emacs" "EMACSSS" "1" "book")

2025

Thinkpad T480 Fn, Ctrl swap

  • We can swap the Function key and Ctrl key in BIOS
  • F1 to enter bios and go to Config menu.
  • Under Keyboard and mouse Fn and Ctrl Key swap make it enabled.

Access google email as RSS

curl -u "Username:App password" https://mail.google.com/mail/feed/atom

If you email is emacs@gmail.com and app password generated by google is emacs is awesome

curl -u "emacs:emacs is awesome" https://mail.google.com/mail/feed/atom

Google colab to finetune llm

During the Foss United March 2025 meetup i came to know that llm can be finetuned using google colab.

Open DNS family shield - Make internet browsing safer for whole family

208.67.222.123, 208.67.220.123

Emacs Copy, Cut (Kill), Paste (Yank) Trick

  • Assume you want to copy or cut part of a paragraph, but not the entire thing.
  • Go to the start of the text you want to select and press C-space twice.
  • Then, move to the end of the text you want to operate on and press C-w to cut (kill) or M-w to copy.
  • This method works in reverse as well, which is quite interesting.
  • Normally, I select the text I want and then press the copy or cut command, but this approach changes the way you do it completely.

CSS before trick

  • If you need to add any whitespace before text use the below logic
h2 {
  text-decoration: underline;
}

h2.space::after {
  content: " ";
  white-space: pre;
}