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
;; when attempting to load reformation.core-front https://github.com/WorldsEndless/reformation/blob/master/test/cljs/reformation/core_front.cljs | |
Show: Project-Only All | |
Hide: Clojure Java REPL Tooling Duplicates (11 frames hidden) | |
1. Unhandled clojure.lang.ExceptionInfo | |
reformation.status does not exist | |
#:cljs.repl{:error :invalid-ns} | |
repl.cljc: 204 cljs.repl$ns__GT_input/invokeStatic | |
repl.cljc: 199 cljs.repl$ns__GT_input/invoke | |
repl.cljc: 243 cljs.repl$load_namespace/invokeStatic |
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
;; CRUD routes are automatically generated for each of CREATE, READ, UPDATE, and DELETE fns | |
;; that exist (with those names) in the `humhelp.db.<table-name>` name-spaces. Note that READ | |
;; fns have multiple arities. With 0 args, they read all; with 1 arg, they read entry `id` | |
(ns humhelp.routes.admin | |
(:require [humhelp.layout :as layout] | |
[humhelp.middleware :as middleware] | |
[humhelp.db.user-groups :as user_groups] | |
[humhelp.db.attachments :as attachments] | |
[humhelp.db.categories :as categories] |
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
isp.shared> d | |
#inst "2018-02-28T20:10:28.477-00:00" | |
isp.shared> (timef/unparse custom-formatter (timec/from-utc-time-zone d)) | |
18-02-28 01:10 pm | |
isp.shared> (def custom-formatter (timef/formatter "Y-MM-dd hh:mm a")) | |
#'isp.shared/custom-formatter | |
isp.shared> (timef/unparse custom-formatter (timec/from-utc-time-zone d)) | |
118-02-28 01:10 pm | |
isp.shared> (def custom-formatter (timef/formatter "YYYY-MM-dd hh:mm a")) | |
#'isp.shared/custom-formatter |
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 isp.routes | |
(:require [reagent.core :as r] | |
[reagent.session :as session] | |
[secretary.core :as secretary :include-macros true] | |
[accountant.core :as accountant] | |
[goog.events :as events] | |
[goog.history.EventType :as HistoryEventType]) | |
(:import goog.History)) | |
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
(defun tsa/insert-current-time (&optional arg) (interactive "P") | |
(let ((command-options (cond | |
((equal arg '(16)) "date") | |
((equal arg '(4)) "date +%Y.%m.%d") | |
(t "date +%H:%M")))) | |
(insert (shell-command-to-string (concat "echo -n $(" command-options ")"))))) | |
(global-set-key (kbd "C-c C-.") 'tsa/insert-current-time) |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; USER DOCUMENT HANDLING ;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(defn make-file-stream | |
"Takes an input stream--such as a MongoDBObject stream-- | |
and produces a input-stream from it" | |
[file] | |
(piped-input-stream | |
(fn [output-stream] | |
(.writeTo file output-stream)))) |
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
goog.addDependency("base.js", ['goog'], []); | |
goog.addDependency("../cljs/core.js", ['cljs.core'], ['goog.string', 'goog.object', 'goog.string.StringBuffer', 'goog.array']); | |
goog.addDependency("../ajax/protocols.js", ['ajax.protocols'], ['cljs.core']); | |
goog.addDependency("../ajax/xml_http_request.js", ['ajax.xml_http_request'], ['cljs.core', 'ajax.protocols']); | |
goog.addDependency("../com/cognitect/transit/util.js", ['com.cognitect.transit.util'], ['goog.object']); | |
goog.addDependency("../com/cognitect/transit/eq.js", ['com.cognitect.transit.eq'], ['com.cognitect.transit.util']); | |
goog.addDependency("../com/cognitect/transit/types.js", ['com.cognitect.transit.types'], ['com.cognitect.transit.util', 'com.cognitect.transit.eq', 'goog.math.Long']); | |
goog.addDependency("../com/cognitect/transit/delimiters.js", ['com.cognitect.transit.delimiters'], []); | |
goog.addDependency("../com/cognitect/transit/caching.js", ['com.cognitect.transit.caching'], ['com.cognitect.transit.delimiters']); | |
goog.addDependency("../com/cognitect |
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
if(typeof Math.imul == "undefined" || (Math.imul(0xffffffff,5) == 0)) { | |
Math.imul = function (a, b) { | |
var ah = (a >>> 16) & 0xffff; | |
var al = a & 0xffff; | |
var bh = (b >>> 16) & 0xffff; | |
var bl = b & 0xffff; | |
// the shift by 0 fixes the sign on the high part | |
// the final |0 converts the unsigned value into a signed value | |
return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); | |
} |
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
(def *data-skeleton* ; ct = cognitect.transit | |
(let [template-url "/data/template" | |
data (GET template-url {:headers {:Accept "application/transit+json"}}) ;; Is an object, not the desired Transit data (though the data shows up in my browser's inspector as the response) | |
transit-reader (do (.log js/console data) ; Object | |
(.log js/console (.getResponse data)) ; (an empty string) | |
(.log js/console (.getResponseBody data)) ; null | |
(.log js/console (.getResponseHeaders data)) ; Object { } | |
(.log js/console (.getResponseType data)) ; (an empty string) | |
(ct/reader :json)) | |
converted (ct/read transit-reader data)] ; this fails: "unexpected character at line 1, char 2" |
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
(str "My first gist!") |