Skip to content

Instantly share code, notes, and snippets.

(ns ab)
(defn- bump [f m]
(into {} (map (juxt (comp f key) val) m)))
(defn- turn [[a b]]
(mapv #(merge-with + b (bump % a)) [inc dec]))
(->> {0 1N}
(repeat 2)
@jsn
jsn / values.txt
Last active February 10, 2023 23:57
(from: "The Power of Full Engagement", by Jim Loehr and Tony Schwartz, Part Two, Chapter Eight)
DEEPEST VALUES CHECKLIST
Authenticity
Happiness
Balance
Harmony
Commitment
Health
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :buildSrc:generateGrammarSource
error(10): internal error: Can't get property indirectDelegates using method get/isIndirectDelegates from org.antlr.tool.Grammar instance : java.lang.NullPointerException
java.util.Objects.requireNonNull(Objects.java:203)
java.util.ArrayList.removeAll(ArrayList.java:695)
org.antlr.tool.CompositeGrammar.getIndirectDelegates(CompositeGrammar.java:222)
org.antlr.tool.Grammar.getIndirectDelegates(Grammar.java:2620)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
@jsn
jsn / a.txt
Created October 26, 2020 23:05
(an excerpt from Dogen's Shobogenzo)
Question 10: Some have said: “Do not concern yourself about birth-and-death.
There is a way to promptly rid yourself of birth-and-death. It is by grasping
the reason for the eternal immutability of the ‘mind-nature.’ The gist of it is
this: although once the body is born it proceeds inevitably to death, the
mind-nature never perishes. Once you can realize that the mind-nature, which
does not transmigrate in birth-and-death, exists in your own body, you make it
your fundamental nature. Hence the body, being only a temporary form, dies here
and is reborn there without end, yet the mind is immutable, unchanging
throughout past, present, and future. To know this is to be free from
birth-and-death. By realizing this truth, you put a final end to the
diff --git a/PKGBUILD b/PKGBUILD
index bc1a54d..875ab64 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,12 +2,13 @@
pkgname=prometheus-nginxlog-exporter-bin
_name=prometheus-nginxlog-exporter
-pkgver=1.4.0
+pkgver=1.7.0
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>X</title>
<style type="text/css" media="screen">
#outer > div {
position: relative ;
float: left ;
border: 1px solid black ;
set $to_yandex 0;
if ($cookie_bltsr) {
set $to_yandex 1;
}
if ($http_x_aab_http_check) {
set $to_yandex 1;
}
unmap('i') ;
map('iu', 'g0') ;
map('io', 'g$') ;
map('ij', '<Ctrl-6>') ;
map('d', 'x') ;
map('u', 'X') ;
map('ih', 'S') ;
map('il', 'D') ;
map('gn', "<Ctrl-'>");
settings.scrollStepSize = 250 ;
;; in the code below, 'f' function is exactly the same as 'g' function,
;; and every line starting with '(time ...)' measures exactly the same
;; calculation. Which is for some reason fast for 'f', for as long as
;; 'g' is not defined, and after that it soon becomes slow both for 'f'
;; and for 'g'. The effect is quite reproducible.
user=> (set! *warn-on-reflection* true)
true
user=> (def xs (int-array 1 0))
#'user/xs
@jsn
jsn / global-deps.edn
Last active December 26, 2019 02:01
my clojure repl setup
{
:aliases {
:deps {:extra-deps
{org.clojure/tools.deps.alpha {:mvn/version "0.6.474"}}}
:dev {:extra-paths ["/home/jason/.clojure/my-dev"]
:extra-deps
{com.bhauman/rebel-readline {:mvn/version "0.1.4"}
nrepl/nrepl {:mvn/version "0.6.0"}
cider/cider-nrepl {:mvn/version "0.21.1"}}
:main-opts ["-m" "myrepl"]}