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
find ./ -type d -maxdepth 1 -iname '.*' -exec echo {}/* \; | sed s/\\.\\///g | sed s/^\\/\\*//g > .gitignore | |
git add .gitignore | |
git add . |
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
# Arch Linux Install dpkg | |
yaourt -S dpkg | |
# Fetch Latest | |
wget -O latest.html -k https://downloads.iridiumbrowser.de/ubuntu/pool/main/i/iridium-browser/ | |
# Find AMD64 Packages |
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 object->clj | |
"My personal utility for converting NodeJS objects. | |
Somtimes js->clj doesn't work..." | |
[object] | |
(let [props (.keys js/Object object) | |
ret (transient {})] | |
(amap props | |
idx | |
_ | |
(let [prop (aget props idx)] |
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
(require | |
'[cljs.repl :as repl] | |
'[cljs.repl.node :as node]) | |
(compile 'cljs.repl.node) | |
(repl/repl* (node/repl-env) | |
{:output-dir "out" | |
:optimizations :none | |
:cache-analysis true |
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 current-web-port [] | |
(as-> js/document x | |
(-> x .-URL str) | |
(or (re-find #":(\d+)/" x) | |
(re-find #":(\d+)" x)) | |
(or (last x) 80))) | |
(defn current-domain [] (.-domain js/document)) | |
(defn websocket-path [& [path]] |
A hopefully short and concise explanation as to how Om/React.js works. This probably isn't for you if you already use ClojureScript or Om.
The front end and JavaScript God known as David Nolen created a ClojureScript library called Om. Om is a front end library that uses React.js and makes web MVC not just obsolete, but an anti-pattern.
In Om there's just the data and the view.
- data =>
A hopefully short and concise explanation as to how Clojure deals with Objects. If you already write Clojure, this isn't for you.
You know what an Interface is if you write/read Java or PHP 5+. In Clojure it might be called defprotocol.
user> (defprotocol IABC
(also-oo [this])
(another-fn [this x]))
IABC