ReactRouter.withRouter injects route information into wrapped component props.
render() { const { match, location, history } = this.props
const Component = withRouter(Component)
(ns clojure-applied.core) | |
; define a map - values can be looked up in near constant time. | |
(def earth { | |
:name "Earth" | |
:moons 4 | |
:volume 1.083 | |
:mass 5.972 | |
:type :Planet | |
}) |
ReactRouter.withRouter injects route information into wrapped component props.
render() { const { match, location, history } = this.props
const Component = withRouter(Component)
https://www.reddit.com/r/Clojure/comments/4j7lyx/docker/
http://www.compoundtheory.com/ - article on Dockerising Clojure
I've been setting up an environment to test out an alternative to CORS for an application I'm developing using Nginx as a reverse proxy in front of three Clojure services. In doing so I needed to setup the backend servers to serve requests. But there was hitch. I was using a Dockerised Nginx which was linking to web service containers. Again, that is working fine.
#https://juxt.pro/blog/posts/beanstalk.html
FROM java:8
ADD target/myproj.0.1.0-SNAPSHOT-standalone.jar /srv/myproj-app.jar
EXPOSE 8080
CMD ["java", "-jar", "/srv/myproj-app.jar"]
; Blocking | |
>!! ; put | |
<!! ; take | |
; determine Clojure version | |
> *clojure-version* | |
; Look in ~/.m2 to see which Clojure versions are installed. |
;; https://stuartsierra.com/2016/clojure-how-to-ns.html | |
;; ns cheatsheet https://gist.github.com/ghoseb/287710/ | |
;; Work with library in REPL - example Cheshire | |
(boot.core/set-env! :dependencies #(conj % '[cheshire "5.5.0"])) | |
(require '[cheshire.core]) | |
;; add dependency | |
(set-env! :dependencies #(conj % '[foo/bar "1.2.3"])) |
# On host | |
$ cd ~/VirtualBox\ VMs/<vm> | |
$ VBoxManage clonehd "box-disk1.vmdk" "clone-disk1.vdi" --format vdi | |
$ VBoxManage modifyhd "clone-disk1.vdi" --resize 50000 | |
$ VBoxManage storageattach $(pwd | cut -d "/" -f5-) --storagectl "SATA" --port 0 --device 0 --type hdd --medium clone-disk1.vdi | |
# On VM | |
$ vagrant up | |
$ vagrant ssh | |
$ sudo su - |