Skip to content

Instantly share code, notes, and snippets.

@mping
mping / commit.md
Last active June 9, 2018 11:47 — forked from abravalheri/commit.md
RFC: Git Commit Message Guidelines

Commit Message Guidelines

Goals

  • allow generating CHANGELOG.md by script
  • allow ignoring commits by git bisect (not important commits like formatting)
  • provide better information when browsing the history

Proposal

@mping
mping / 00_notes.md
Created September 22, 2018 18:34 — forked from Deraen/00_notes.md
Compojure-api and Buddy
  • (:identity req) is auth backend independent way to access user data
  • login and logout implementation depends on auth backend
  • :current-user doesn't imply that authentication is required, route should also have :auth-rules if authentication is required
@mping
mping / either.clj
Created February 15, 2021 19:19 — forked from mping-exo/either.clj
(require '[clojure.spec.alpha :as s])
(s/def ::test (s/and (s/keys :req-un [(or ::key1 ::key2)])
(fn [{:keys [key1 key2]}]
(not (and key1 key2)))))
;; s/or validates some of the keys
;; the (fn..) ensures that both keys CANNOT be present
@mping
mping / ducky.md
Created July 4, 2022 12:49 — forked from rizalgowandy/ducky.md
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2

To use media keys on the Ducky One 2, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function:

Thread Pools

Thread pools on the JVM should usually be divided into the following three categories:

  1. CPU-bound
  2. Blocking IO
  3. Non-blocking IO polling

Each of these categories has a different optimal configuration and usage pattern.

@mping
mping / ducky.md
Created September 19, 2023 10:59 — forked from schmich/ducky.md
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2 Skyline

To use media keys on the Ducky One 2 RGB TKL, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function: