This file contains 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
SELECT | |
pid, | |
user, | |
pg_stat_activity.query_start, | |
now() - pg_stat_activity.query_start AS query_time, | |
query, | |
state, | |
wait_event_type, | |
wait_event | |
FROM pg_stat_activity |
This file contains 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
#!/usr/bin/env bash | |
JQ=$(which jq) | |
[[ -n ${JQ} ]] || exit 1 | |
[[ -x ${JQ} ]] || exit 2 | |
brew info --json=v1 --installed | jq "map({name: .name, desc: .desc, version: .installed[].version})" |
This file contains 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 com.myproject.model | |
(:require [honey.sql :as sql] | |
[clojure.string :as s])) | |
;; honeysql clause extension | |
;; Updates existing rows, and insert rows that don't exist. | |
;; If no key column is specified, the primary key columns are used to find the row. | |
;; If more than one row per new row is affected, an exception is thrown. |
This file contains 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 rsa-sign | |
(:require [clojure.java.io :as io]) | |
(:import (org.bouncycastle.openssl PEMParser) | |
(java.security KeyFactory Signature SecureRandom PublicKey) | |
(java.security.spec PKCS8EncodedKeySpec X509EncodedKeySpec) | |
(java.util Base64))) | |
;(java.security.Security/addProvider (org.bouncycastle.jce.provider.BouncyCastleProvider.)) | |
(def _cr "RSA") |
NewerOlder