This file contains hidden or 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
<? | |
if(file_exists('/www/global/lockdown')) { | |
if($_COOKIE['4chan_auser'] && $_COOKIE['4chan_apass'] && ($_POST['mode']=='usrdel'||$_GET['mode']=='latest')) { | |
// ok | |
} | |
else { | |
die('Posting temporarily disabled. Come back later!<br/>—Team 4chan (uptime? what\'s that?)'); | |
} | |
} | |
include_once "./yotsuba_config.php"; |
This file contains hidden or 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
(defn pgobj->clj [^org.postgresql.util.PGobject pgobj] | |
(let [type (.getType pgobj) | |
value (.getValue pgobj)] | |
(case type | |
"json" (cheshire.core/parse-string value true) | |
"jsonb" (cheshire.core/parse-string value true) | |
"citext" (str value) | |
value))) | |
(extend-protocol next.jdbc.result-set/ReadableColumn |
This file contains hidden or 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
(defn between [from target to] | |
(and (<= from target) (<= target to))) | |
(defn calculate-loan-size | |
[loan-amount] | |
(cond | |
(between 1 loan-amount 10000) :small | |
(between 10001 loan-amount 50000) :modest | |
(between 50001 loan-amount 150000) :large | |
(>= loan-amount 150001) :jumbo)) |
This file contains hidden or 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
(def log-store (atom {})) | |
(defn debug [tag val] | |
(swap! log-store update-in [tag] #(conj (or % []) val)) | |
val) | |
(defn logs | |
[tag & functions] | |
(let [tag (if (number? tag) | |
(nth (keys @log-store) tag) |
This file contains hidden or 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
{d user/debug-data-reader} |
This file contains hidden or 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
{:aliases {:dev {:extra-paths ["/Users/dliman/.clojure"]}}} |
This file contains hidden or 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
(use-package! smartparens | |
:init | |
(map! :map smartparens-mode-map | |
... | |
"s-5" #'user-reset-log-store | |
"s-6" #'user-tags | |
"s-7" #'user-logs)) | |
;; or |
This file contains hidden or 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
(defun user-reset-log-store () | |
(interactive) | |
(cider-interactive-eval "(reset! user/log-store {})")) | |
(defun user-tags () | |
(interactive) | |
(cider--pprint-eval-form "(user/tags)")) | |
(defun user-logs (&optional index-or-name) | |
(interactive) |
NewerOlder