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
ubuntu@box3:~$ cat ~/.gemrc | |
:sources: | |
- https://rubygems.org | |
gem: --no-ri --no-rdoc |
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
$:~/foo$ rvm --version | |
rvm 1.23.8 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/] | |
~/foo$ cat .ruby-gemset | |
foo | |
~/foo$ which bundle | |
/home/ubuntu/.rvm/gems/ruby-2.0.0-p247@global/bin/bundle |
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
remote: Counting objects: 579, done. | |
remote: Compressing objects: 100% (249/249), done. | |
remote: Total 579 (delta 303), reused 567 (delta 293) | |
Receiving objects: 100% (579/579), 130.75 KiB | 0 bytes/s, done. | |
Resolving deltas: 100% (303/303), done. | |
Could not verify the SSL certificate for https://rubygems.org/. | |
There is a chance you are experiencing a man-in-the-middle attack, but most | |
likely your system doesn't have the CA certificates needed for verification. For | |
information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without | |
using SSL, edit your Gemfile sources and change 'https' to 'http'. |
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
(try | |
true | |
(catch | |
java.lang.Throwable | |
&throw-context | |
(clojure.core/let [&throw-context (clojure.core/-> | |
&throw-context | |
slingshot.support/get-context | |
slingshot.support/*catch-hook*)] | |
(clojure.core/cond |
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
java.lang.AssertionError: Assert failed: clojure.core.typed.type_rep.TCResult@fed09158 | |
(not expected) | |
check.clj:4426 clojure.core.typed.check/eval65845[fn] | |
RestFn.java:423 clojure.lang.RestFn.invoke | |
MultiFn.java:231 clojure.lang.MultiFn.invoke | |
check.clj:3074 clojure.core.typed.check/eval65274[fn] | |
check.clj:3066 clojure.core.typed.check/eval65274[fn] | |
protocols.clj:143 clojure.core.protocols/fn | |
protocols.clj:19 clojure.core.protocols/fn[fn] | |
protocols.clj:31 clojure.core.protocols/seq-reduce |
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 circle.monkey-patch-clojure-test | |
"less buggy test runner" | |
(:require clojure.test)) | |
(in-ns 'clojure.test) | |
(require '[clojure.core.strint :refer (<<)]) | |
(defn test* | |
"Circle monkeypatch." | |
[v] |
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
(defn resolve-map-fn | |
"given a record type, resolve and return it's map->Foo fn" | |
[record-class] | |
(let [simple-name (.getSimpleName record-class) | |
full-name (.getName record-class) | |
[_ the-ns] (re-find (re (<< "(.*)\\.~{simple-name}")) full-name)] | |
(when the-ns | |
(ns-resolve (find-ns (symbol the-ns)) (symbol (<< "map->~{simple-name}")))))) |
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
;; File 1 | |
(ns foo.bar | |
;; any :use or :refer is acceptable here, as long as the refer'd fn is not present in the user namespace (or wherever analyze is run from) | |
(:require [clojure.set :refer (intersection)])) | |
(defn foo [x y] | |
(intersection x y)) | |
;; at the repl |
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
(defmacro def-with-disable-macro | |
"Generates a pair of macros, with-enable-foo and with-disable-foo, which use with-redefs to replace foo with (constantly nil), or restore it." | |
[v short-name] | |
(let [disable-name (symbol (format "with-disable-%s" short-name)) | |
enable-name (symbol (format "with-enable-%s" short-name))] | |
`(do | |
(let [v# #'~v | |
v-name# (quote ~v) | |
old-value# (deref #'~v) | |
ns# *ns*] |
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
root@box16:~# cat /etc/timezone | |
Etc/UTC | |
root@box16:~# echo Americas/Los_Angeles | sudo tee /etc/timezone | |
Americas/Los_Angeles | |
root@box16:~# cat /etc/timezone | |
Americas/Los_Angeles | |
root@box16:~# sudo dpkg-reconfigure --frontend noninteractive tzdata | |
Current default time zone: 'Etc/UTC' |