Skip to content

Instantly share code, notes, and snippets.

@rsslldnphy
rsslldnphy / 1984.txt
Created January 10, 2021 16:52
It's just like 1984!
PART ONE
Chapter 1
It was a bright cold day in April, and the clocks were striking thirteen.
Winston Smith, his chin nuzzled into his breast in an effort to escape the
PART ONE
Chapter 1
It was a bright cold day in April, and the clocks were striking thirteen.
Winston Smith, his chin nuzzled into his breast in an effort to escape the
@rsslldnphy
rsslldnphy / HOWTO.txt
Last active October 3, 2020 09:40
Select All articles in Pocket
1. Open pocket in your browser
2. Open the javascript console
3. Paste the above code
4. Call the function `selectAll()`
@rsslldnphy
rsslldnphy / postgis.rb
Last active July 3, 2020 08:27
postgis.rb
class Postgis < Formula
desc "Adds support for geographic objects to PostgreSQL"
homepage "https://postgis.net/"
url "https://download.osgeo.org/postgis/source/postgis-3.0.1.tar.gz"
sha256 "5a5432f95150d9bae9215c6d1c7bb354e060482a7c379daa9b8384e1d03e6353"
revision 2
bottle do
cellar :any
sha256 "3539d7a762060bbd8eaa7fb89c2cb7a6de53d5adffb632573b592bfc6d9301b3" => :catalina

Keybase proof

I hereby claim:

  • I am rsslldnphy on github.
  • I am rsslldnphy (https://keybase.io/rsslldnphy) on keybase.
  • I have a public key ASAq1uMLZ_XiHdtnavj4w_B0PeWhZPet1Hq459wn7xofSAo

To claim this, I am signing this object:

@rsslldnphy
rsslldnphy / runner.clj
Last active November 29, 2017 16:11
Simple Job Runner
(ns healthunlocked.runner
(:require [clojure.walk :as walk]
[com.stuartsierra.component :as component]
[schema.core :as s]
[taoensso.timbre :as log]))
(s/defschema Params
{s/Any s/Any})
(s/defschema Job
@rsslldnphy
rsslldnphy / sql.clj
Created November 27, 2017 16:26
HugSQL namespace generator macro
(ns my-app.sql
(:require [hugsql.core :as hugsql]))
(defmacro defsql
[& args]
(let [files (vec (drop-last 2 args))
alias (last args)]
`(let [current-namespace# *ns*
query-namespace# (symbol (str (ns-name *ns*) ".sql"))]
(create-ns query-namespace#)
@rsslldnphy
rsslldnphy / re_frame.cljs
Created July 3, 2015 14:37
custom register-sub
(if-not goog.DEBUG
(def register-sub rf/register-sub)
(do
(defonce subcounts (atom {}))
(aset js/document "subcounts" #(.table js/console (clj->js
(for [[k vs]
(reverse (sort-by :total-time @subcounts))]
(assoc vs :subscription (str k))))))
@rsslldnphy
rsslldnphy / table.cljs
Created June 12, 2015 15:46
responsive fixed-data-table
(defn pixel-size
[size]
(u/str->int (second (re-matches #"(.*)px$" size))))
(defn percent-size
[size]
(u/str->int (second (re-matches #"(.*)%$" size))))
(defn absolute-column-widths
[columns]