Skip to content

Instantly share code, notes, and snippets.

View czan's full-sized avatar

Carlo Zancanaro czan

  • Sydney, Australia
View GitHub Profile
(require '[clojure.test :refer [is]])
(require '[clojure.test.check.generators :as gen])
(require '[stateful-check.core :refer [specification-correct?]])
(def node-gen
(gen/fmap (fn [n] {:type :node, :id n}) gen/nat))
(defn request-gen [nodes]
(if (seq nodes)
@czan
czan / 1-ubuntu-version
Last active January 12, 2019 00:18
FsCheck build errors
~/src/FsCheck $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
@czan
czan / convert_to_openapi.clj
Last active August 19, 2022 06:00
Reitit OpenAPI3 hack
(ns ^{:doc "Convert Swagger 2 specs to OpenAPI 3 specs
We're using the standard reitit mechanisms to produce a Swagger spec,
but we'd much rather be using an OpenAPI 3 spec. This namespace does a
conversion for us, until the functionality lands in reitit."}
convert-to-openapi
(:require [camel-snake-kebab.core :refer [->PascalCase]]
[clojure.set :refer [rename-keys]]
[clojure.string :as str]
[clojure.walk :as walk]
@czan
czan / org-roam-relationship.el
Created September 13, 2023 00:41
Link types for Org Roam
;;; org-roam-relationship.el --- Link types to represent relationships in Org Roam -*- lexical-binding: t; -*-
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the