Skip to content

Instantly share code, notes, and snippets.

cljs.user> (doc +)
-------------------------
cljs.core/+
([] [x] [x y] [x y & more])
Returns the sum of nums. (+) returns 0.
nil
cljs.user> (ns batman)
WARNING: batman is a single segment namespace at line 1 <cljs repl>
batman> (cljs.repl/doc +)
-------------------------
@jobez
jobez / private.clj
Created January 1, 2016 06:38 — forked from egamble/private.clj
Two ways to call private methods in Clojure.
;; This fn allows calling any method, as long as it's the first with that name in getDeclaredMethods().
;; Works even when the arguments are primitive types.
(defn call-method
[obj method-name & args]
(let [m (first (filter (fn [x] (.. x getName (equals method-name)))
(.. obj getClass getDeclaredMethods)))]
(. m (setAccessible true))
(. m (invoke obj (into-array Object args)))))
~ $ ls *.log | awk 'BEGIN { print "[" } { printf "{:dirname \"%s\"} ", $0 } END { print " ] " }'
[
{:dirname "<none>.log"} {:dirname "_region_.log"} {:dirname "circle.log"} {:dirname "npm-debug.log"} ]
~ $
~ $ ls *.log | awk 'BEGIN { print "[" } { printf "{:filename \"%s\"} ", $0 } END { print " ] " }' >>> #<buffer *scratch*>
@jobez
jobez / init.js
Last active January 12, 2016 21:37
#!/usr/bin/env node
#!/usr/bin/env node
var cljs = require("clojurescript");
var orgModeParser = require("org-mode-parser");
var _ = require("underscore");
var fs = require("fs");
String.prototype.attribute = function(attr, match) {
return this.replace(match, "\x1b[" + attr + "m$1\x1b[0m");
}
@jobez
jobez / trump.org
Last active November 9, 2016 07:10

trump

Worst fears are interesting little accoutrements. When our models fray and a common ground decentered, a very phenomenal armagedeon happens.

Not that I know what to make of worst fears and the slack jawed awe of the burden of proof on suspended paradises. But I do know that maybe a lot of people I know and love feel a little disappointed, scared, and worried.

Your wounds are yours–obviously. This isn’t some weird drill sargeant berating or anything. Just a friendly reminder–as the world goes wild, don’t forget the reckoning of your breath. We have entered the bizarre timeline.

(in-package #:pile.experiments)
(defvar *running* nil)
(defvar *initd* nil)
(defvar *ui-root* nil)
(defun init-all ()
(unless *initd*
(unless cepl.context:*gl-context*
(cepl:repl 800 800 3.1))
@jobez
jobez / deps.edn
Last active July 11, 2018 04:15
secret
{:paths ["."]
:deps {}}

commons

mind streams

  • 2020
  • refile
  • cards
  • repo

Wilber

  • 1583955 1583963
  • 1582345 1582353
  • 1580943 1580951
  • 1570021 1570029