Skip to content

Instantly share code, notes, and snippets.

Avatar

Avi Flax aviflax

View GitHub Profile
@ybiquitous
ybiquitous / skip-ci-on-actions.yml
Last active Feb 9, 2021
How to "[skip ci]" on GitHub Actions
View skip-ci-on-actions.yml
# 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]
@AlexVPopov
AlexVPopov / clojure.spec cheat sheet.md
Last active Feb 21, 2020
A cheat sheet for clojure.spec
View clojure.spec cheat sheet.md

clojure.spec cheat sheet

Specs

Require

(ns my.ns
  (:require [clojure.spec.alpha :as s]))
@jffry
jffry / gen.clj
Created Nov 18, 2019
Clojure/conj 2019 Schedule
View gen.clj
;; 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))
@mhart
mhart / ci.yml
Last active May 23, 2022
GitHub Actions running 5 tslint jobs in parallel (each tests every 5th file)
View ci.yml
name: CI
on: [push]
jobs:
tslint:
runs-on: ubuntu-latest
strategy:
matrix:
job: [0, 1, 2, 3, 4]
@mhart
mhart / npm-ci.sh
Created Sep 28, 2019
Simple module caching script, for CI or similar
View npm-ci.sh
#!/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}')
@ericnormand
ericnormand / 00_script.clj
Last active Mar 27, 2022
Boilerplate for running Clojure as a shebang script
View 00_script.clj
#!/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='
@bhb
bhb / README.md
Last active Jan 15, 2022
Clojure friendly mode, inspired by https://github.com/slipset/friendly
View README.md
@afeld
afeld / README.md
Last active Aug 27, 2019
archive inactive GitHub repositories in an organization
@sudodoki
sudodoki / flatten-maps.clj
Last active Jun 9, 2020
Flatten nested maps using clojure / clojurescript using compound keys
View flatten-maps.clj
(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]]
@itod
itod / split_keyboards.md
Last active Jun 20, 2022
Every "split" mechanical keyboard currently being sold that I know of
View split_keyboards.md