Skip to content

Instantly share code, notes, and snippets.

@itod
itod / split_keyboards.md
Last active April 28, 2024 19:44
Every "split" mechanical keyboard currently being sold that I know of
@sudodoki
sudodoki / flatten-maps.clj
Last active November 29, 2023 00:26
Flatten nested maps using clojure / clojurescript using compound keys
(defn get-key
[prefix key]
(if (nil? prefix)
key
(str prefix "-" key)))
(defn flatten-map-kvs
([map] (flatten-map-kvs map nil))
([map prefix]
(reduce
(fn [memo [k v]]
@afeld
afeld / README.md
Last active August 27, 2019 05:04
archive inactive GitHub repositories in an organization
@bhb
bhb / README.md
Last active May 15, 2023 01:28
Clojure friendly mode, inspired by https://github.com/slipset/friendly
@ericnormand
ericnormand / 00_script.clj
Last active January 6, 2024 07:13
Boilerplate for running Clojure as a shebang script
#!/bin/sh
#_(
#_DEPS is same format as deps.edn. Multiline is okay.
DEPS='
{:deps {clj-time {:mvn/version "0.14.2"}}}
'
#_You can put other options here
OPTS='
@mhart
mhart / npm-ci.sh
Created September 28, 2019 18:26
Simple module caching script, for CI or similar
#!/bin/bash -ex
# Tries to download latest cached node_modules based on package-lock.json
# If it can't, then `npm ci` and push up node_modules to cache
# Assumes S3_BUCKET env var has been set, and that `aws` credentials
# are configured (either in env, or ~/.aws/credentials)
CHECKSUM=$(sha256sum package-lock.json | awk '{print $1}')
@mhart
mhart / ci.yml
Last active May 23, 2022 04:36
GitHub Actions running 5 tslint jobs in parallel (each tests every 5th file)
name: CI
on: [push]
jobs:
tslint:
runs-on: ubuntu-latest
strategy:
matrix:
job: [0, 1, 2, 3, 4]
@jffry
jffry / gen.clj
Created November 18, 2019 01:57
Clojure/conj 2019 Schedule
;; Run me with:
;; clojure -Sdeps '{:deps {org.jsoup/jsoup {:mvn/version "1.12.1"}}}' gen.clj
(require '[clojure.string :as str])
(import (java.time.format DateTimeFormatter)
(java.time LocalDate LocalTime ZoneId ZonedDateTime)
(java.util UUID)
(org.jsoup Jsoup)
(org.jsoup.nodes Document))
@AlexVPopov
AlexVPopov / clojure.spec cheat sheet.md
Last active February 21, 2020 07:08
A cheat sheet for clojure.spec

clojure.spec cheat sheet

Specs

Require

(ns my.ns
  (:require [clojure.spec.alpha :as s]))
@ybiquitous
ybiquitous / skip-ci-on-actions.yml
Last active February 9, 2021 10:11
How to "[skip ci]" on GitHub Actions
# See also:
# - https://github.com/actions/runner/issues/774
# - https://help.github.com/en/actions/reference/events-that-trigger-workflows#push-event-push
# - https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request
# - https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions
name: "[skip ci]" on Actions
on: [push, pull_request]