I hereby claim:
- I am blad on github.
- I am btellez (https://keybase.io/btellez) on keybase.
- I have a public key whose fingerprint is B4BE BFD4 EA0C 8EAA 955B 2A86 4CF6 EF8F CC85 3F7D
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
-- show running queries (pre 9.2) | |
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(query_start, clock_timestamp()), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
; Lain Script for Ronin | |
; https://hundredrabbits.github.io/Ronin/ | |
(def win | |
(js)) | |
(def screen | |
(:screen win)) | |
(clear) |
(def background "#242424") | |
(def dark "#72dec211") | |
(def light "#72dec222") | |
(def segment:l 400) | |
(def segment:shift 2) | |
(def screeen:w 1280) | |
(def screeen:h 800) | |
(clear) | |
(open $path .5) | |
(def background "black") | |
(def unit 10) | |
(def padding 1) | |
(def r (sub (div unit 2) padding)) | |
(def f (get-frame)) |
(def y ()) | |
(defn identity (x) x) | |
(defn copy-list | |
(xs) | |
(map xs identity)) | |
(defn append | |
(xs item) |
(clear) | |
(def c:x 300) | |
(def c:y 300) | |
(def c:r 200) | |
(def petal-color (gradient (line 160 165 299 297) ("gold" "goldenrod"))) | |
; Draw Background: | |
(fill (get-frame) (gradient (line 301 300 301 5) ("#333" "#222"))) | |
(fill |
;; 1. Create Black-Transparent Mask from Black-White Image: | |
(open $path .15) | |
(defn bw-to-alpha | |
(p) | |
(p:0 p:1 p:2 (sub 255 p:0))) | |
(defn to-black-transparent | |
(pixel q) | |
(bw-to-alpha pixel)) |
(resize 100 100) | |
(fill (get-frame) "white") | |
(stroke (rect 23 26 54 49) "black") | |
(def f (get-frame)) | |
(def pls 1) | |
(def mns (sub 0 1)) | |
(defn shift-x (p a) | |
(pos (clamp (add p:x a) 0 f:w) p:y)) |
(defn bezier-line | |
(points color) | |
( | |
(def ts (range 0 1 .001)) | |
; Calculate the coordniates of the bezier curve: | |
(defn bezier-point | |
(t x0 x1 x2) | |
(add x1 | |
(mul | |
(pow |