This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns build | |
(:require [clojure.tools.build.api :as b])) | |
(def lib 'missionary/missionary) | |
(def version "b.34p") ;;;; warning: local version | |
(def class-dir "target/classes") | |
(def jar-file (format "target/%s-%s.jar" (name lib) version)) | |
;; delay to defer side effects (artifact downloads) | |
(def basis (delay (b/create-basis {:project "deps.edn"}))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns reducible | |
(:require [clojure.java.io :as io]) | |
(:import (clojure.lang IReduceInit))) | |
(defn file-lines | |
"Returns a reducible collection over lines of a file. | |
It is not lazy and releases resources when reduction ends." | |
[filepath] | |
(reify IReduceInit | |
(reduce [_this rf start] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Section "InputClass" | |
Identifier "Kensington Eagle Trackball" | |
MatchProduct "Primax Kensington Eagle Trackball" | |
MatchDriver "libinput" | |
Option "Rotation Angle" "270.0" | |
EndSection | |
Section "InputClass" | |
Identifier "Nulea Trackball" | |
MatchProduct "Compx 2.4G Receiver Mouse" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE configuration> | |
<configuration debug="true"> | |
<import class="ch.qos.logback.core.ConsoleAppender"/> | |
<import class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"/> | |
<import class="ch.qos.logback.core.rolling.RollingFileAppender"/> | |
<import class="ch.qos.logback.classic.filter.ThresholdFilter"/> | |
<import class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"/> | |
<import class="net.logstash.logback.encoder.LogstashEncoder"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn assoc-some | |
"Assoc value in map if value is not nil." | |
([m k v] | |
(cond-> m | |
(some? v) (assoc k v))) | |
([m k v & kvs] | |
{:pre [(even? (count kvs))]} | |
(into (assoc-some m k v) | |
(comp | |
(partition-all 2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; save user defined attributes in default location: | |
;; ~/.config/git/attributes | |
*.clj diff=clojure | |
*.cljs diff=clojure | |
*.cljc diff=clojure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; Varargs helpers | |
(defn- simple-name | |
[s] | |
(if-let [idx (str/index-of s \$)] (subs s (inc idx)) s)) | |
(defn- helper-name | |
[cls] | |
(-> (simple-name cls) | |
(str/replace #"([a-z0-9])([A-Z]+)" "$1-$2") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script to show current keyboard layout in i3status bar | |
# Requires https://github.com/nonpop/xkblayout-state | |
# Inspiration from https://github.com/vzaliva/scripts_and_configs/blob/master/scripts/i3status.sh | |
# set your keymap as you wish | |
# ex: setxkbmap -layout 'us,us,fr' -variant 'mac,colemak,oss' -option grp:ctrls_toggle -option caps:escape |