Skip to content

Instantly share code, notes, and snippets.

View pmonks's full-sized avatar
👔
Preparing TPS report cover pages

Peter Monks pmonks

👔
Preparing TPS report cover pages
View GitHub Profile
@pmonks
pmonks / AI-Use-Restriction-Addendum-1.0.txt
Last active February 7, 2026 01:44
AI Use Restriction Addendum, version 1.0
AI‑USE RESTRICTION ADDENDUM, Version 1.0
This Addendum imposes additional conditions restricting certain uses of the
Licensed Work in connection with Artificial Intelligence systems. When properly
attached or referenced by the Licensor, this Addendum forms part of the license
terms governing the Licensed Work.
0. DEFINITIONS
@pmonks
pmonks / once.clj
Created December 7, 2025 02:27
A `once` macro for Clojure
;
; Copyright © 2025 Peter Monks
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at https://mozilla.org/MPL/2.0/.
;
; SPDX-License-Identifier: MPL-2.0
;
@pmonks
pmonks / poll-atom.clj
Last active August 14, 2025 03:07
A configurable polling alternative to clojure.core/add-watch
;
; Copyright © 2022 Peter Monks
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at https://mozilla.org/MPL/2.0/.
;
; SPDX-License-Identifier: MPL-2.0
;
@pmonks
pmonks / ns-docs.clj
Last active August 4, 2025 09:54
Print the docstrings of all public vars in a namespace, as well as the doctring of the namespace itself
;
; Copyright © 2016 Peter Monks
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at https://mozilla.org/MPL/2.0/.
;
; SPDX-License-Identifier: MPL-2.0
;
@pmonks
pmonks / deps.edn
Last active July 7, 2024 00:58
Super simple example of a Discord slash command implemented in Clojure, that provides a /echo command that simply echos its input. Uses the discljord and slash libraries.
;
; Copyright © 2024 Peter Monks
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
@pmonks
pmonks / java-members.clj
Last active August 20, 2025 15:39
Pretty prints results from clojure.reflect/reflect on an object or class in an idiomatic Clojure fashion
;
; Copyright © 2023 Peter Monks
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at https://mozilla.org/MPL/2.0/.
;
; SPDX-License-Identifier: MPL-2.0
;
@pmonks
pmonks / README.md
Last active October 12, 2022 22:34 — forked from johan-carlsson/README.md
Clojure friendly mode with nrepl starting on port 7888, inspired by https://github.com/slipset/friendly
@pmonks
pmonks / martian_alfresco.clj
Last active August 9, 2021 20:31
Quick play with Martian, using some Alfresco API definitions
;
; Copyright © 2021 Peter Monks
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
@pmonks
pmonks / dep-nses.clj
Last active July 28, 2025 18:27
Get the namespaces for a Clojure dep
;
; Copyright © 2021 Peter Monks
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at https://mozilla.org/MPL/2.0/.
;
; SPDX-License-Identifier: MPL-2.0
;
;
; Copyright © 2020 Peter Monks
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software