Skip to content

Instantly share code, notes, and snippets.

View fmnoise's full-sized avatar
🇺🇦

fmnoise

🇺🇦
View GitHub Profile
@fmnoise
fmnoise / rich-already-answered-that.md
Created September 11, 2025 14:50 — forked from reborg/rich-already-answered-that.md
A curated collection of answers that Rich gave throughout the history of Clojure

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link in the table of content jumps at the copy of the answer on this page.
  • The link on the answer itself points back at the original post.

Table of Content

@fmnoise
fmnoise / semantic-commit-messages.md
Last active January 25, 2023 21:22 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

Format: <type>(<scope>): <subject>

<scope> is optional

Example

feat: add hat wobble
@fmnoise
fmnoise / renew-gpgkey.md
Last active May 21, 2022 09:38 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@fmnoise
fmnoise / .gitattributes
Created June 22, 2021 08:42 — forked from amalloy/.gitattributes
Clojure-aware git-diff hunk headers
*.clj diff=clojure
*.cljs diff=clojure
*.cljx diff=clojure
@fmnoise
fmnoise / spec-meta.clj
Created May 12, 2020 10:39
Spec metadata
(defn form-spec [spec err-format]
(with-meta (s/spec spec) {:err-format err-format}))
(s/def ::number (form-spec int? (fn [k v] (str (name k) " is not a valid number: " v))))
(s/def :address/apt (form-spec ::number (fn [_ v] (str "wrong apartment number: " v))))
(s/def :address/strno ::number)
(s/def :address/street string?)
(s/def ::addr (s/keys :req-un [:address/apt :address/street :address/strno]))
@fmnoise
fmnoise / heap-dump.clj
Created April 26, 2020 13:05
Making heap dump from repl
;; https://matthewdowney.github.io/forcing-jvm-heap-dump-programmatically-clojure.html
(import 'java.lang.management.ManagementFactory)
(import 'com.sun.management.HotSpotDiagnosticMXBean)
(let [server (ManagementFactory/getPlatformMBeanServer)
bean-name "com.sun.management:type=HotSpotDiagnostic"
bean (ManagementFactory/newPlatformMXBeanProxy server bean-name HotSpotDiagnosticMXBean)
live-objects-only? false]
(.dumpHeap bean "dump.hprof" live-objects-only?))
@fmnoise
fmnoise / nginxproxy.md
Created May 24, 2019 15:14 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@fmnoise
fmnoise / cider-lein
Last active April 10, 2019 11:38
lein wrapper for VSCode
lein update-in :dependencies conj \[nrepl/nrepl\ \"0.6.0\"\ \:exclusions\ \[org.clojure/clojure\]\] \
-- update-in :plugins conj \[cider/cider-nrepl\ \"0.21.1\"\] \
-- update-in :plugins conj \[refactor-nrepl\ \"2.4.0\"\] \
-- "$@"
@fmnoise
fmnoise / github.css
Last active May 29, 2019 13:14
Github Stylus
.blob-num,
.blob-code-inner {
font-size: 17px;
font-family: "CamingoCode";
-webkit-font-smoothing: subpixel-antialiased;
line-height: 25px;
}
.blob-num,
.blob-code-inner,
@fmnoise
fmnoise / Makefile
Created March 20, 2019 19:59 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.