I hereby claim:
- I am pikariop on github.
- I am pikariop (https://keybase.io/pikariop) on keybase.
- I have a public key ASCGKmPerKw3t1AEEq0NBQfSLqqRjitSHWU3uM1nH7sSzQo
To claim this, I am signing this object:
(defn symmetric-difference [& sets] | |
(set/difference (apply set/union sets) (apply set/intersection sets))) |
(defn random-string | |
"Generates a string of `length` characters between ascii code points 65...90 (A-Z) and 97...122 (a-z)" | |
[length] | |
(let [random-ascii-char-seq (repeatedly #(char (+ (rand-nth [65 97]) | |
(rand-int 26))))] | |
(apply str (take length random-ascii-char-seq)))) |
(require '[clojure.pprint :as pp]) | |
(import '[java.awt.datatransfer DataFlavor StringSelection Transferable]) | |
(defn clipboard [] | |
(.getSystemClipboard (java.awt.Toolkit/getDefaultToolkit))) | |
(defn slurp-clipboard [] | |
(try | |
(.getTransferData (.getContents (clipboard) nil) (DataFlavor/stringFlavor)) | |
(catch java.lang.NullPointerException e nil))) |
#!/bin/bash | |
# | |
# in repository root, find files with typical clojure extensions, grep and count lines that are not comments or blank, then sum with awk | |
find . -type f -name "*.clj" -o -name "*.cljc" -o -name "*.cljs" | | |
xargs -I '%' grep --count --invert-match --extended-regexp "^;|^[[:blank:]]*$" % | | |
awk '{lines += $1} END {print lines}' | |
# -L = follow symlinks | |
# prune results under path "./target" which contains generated cljs |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/php | |
<?php | |
/* | |
* https://rekry.poutapilvi.fi | |
*/ | |
function quadratic_residue($seed, $mod) { | |
return $seed * $seed % $mod; |