I hereby claim:
- I am thickey on github.
- I am thickey (https://keybase.io/thickey) on keybase.
- I have a public key whose fingerprint is 0F57 43A7 EEA0 7E10 A21C 2246 3036 3ED5 7F1F 6258
To claim this, I am signing this object:
FIELDS = ['cmd', 'command', 'start', 'end', 'delta', 'msg', 'stdout', 'stderr'] | |
def human_log(res): | |
if type(res) == type(dict()): | |
for field in FIELDS: | |
if field in res.keys(): | |
encoded_field = res[field].encode('utf-8') | |
print '\n{0}:\n{1}'.format(field, encoded_field) |
function Retry-Command | |
{ | |
param ( | |
[Parameter(Mandatory=$true)][string]$command, | |
[Parameter(Mandatory=$true)][hashtable]$args, | |
[Parameter(Mandatory=$false)][int]$retries = 5, | |
[Parameter(Mandatory=$false)][int]$secondsDelay = 2 | |
) | |
# Setting ErrorAction to Stop is important. This ensures any errors that occur in the command are |
;; Clojure | |
(require 'clojure-mode) | |
(setq auto-mode-alist (cons '("\\.cljs$" . clojure-mode) auto-mode-alist)) | |
(setq inferior-lisp-program "lein repl") | |
;; clj-refactor | |
(require 'clj-refactor) | |
(add-hook 'clojure-mode-hook (lambda () | |
(clj-refactor-mode 1) | |
(cljr-add-keybindings-with-prefix "C-c C-o"))) |
I hereby claim:
To claim this, I am signing this object:
(ns nested-routing.core | |
(:require-macros [om.core :as om] | |
[secretary.core :refer [defroute]]) | |
(:require [om.dom :as dom] | |
[om.core :as om] | |
[secretary.core :as secretary] | |
[goog.events :as events] | |
[goog.history.EventType :as EventType]) | |
(:import goog.History)) |
I hereby claim:
To claim this, I am signing this object:
Handling multiple results from SQL that includes temp tables.
NB! this is using clojure.java.jdbc v0.6.1, as we have performance issues w/ 0.7.x
Although this gist was very helpful when all statements return results, this is what is ultimately needed to properly traverse the intermediate reults that return nothing (e.g. temp tables).
(ns flatmap | |
(:require [clojure.string :as str])) | |
(def default-delimiter \$) | |
;; via https://stackoverflow.com/questions/31704704/depth-first-tree-traversal-accumulation-in-clojure/31709202#31709202 | |
(defn traverse [t] | |
(letfn [(traverse- [path t] | |
(when (seq t) |