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
Exception in thread "main" java.lang.Exception: Unsupported binding form: :as, compiling:(cljs/closure.clj:1127:1) | |
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6567) | |
at clojure.lang.Compiler.analyze(Compiler.java:6361) | |
at clojure.lang.Compiler.analyze(Compiler.java:6322) | |
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708) | |
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139) | |
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751) | |
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558) | |
at clojure.lang.Compiler.analyze(Compiler.java:6361) | |
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548) |
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 example.core | |
(:require [reagent.core :as reagent :refer [atom]])) | |
(enable-console-print!) | |
(defonce atom1 (atom 1)) | |
(defonce atom2 (atom 2)) | |
(defn handle-file [root stat next] | |
(println "handle file") |
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 example.core | |
(:require [reagent.core :as reagent :refer [atom]])) | |
(enable-console-print!) | |
(defonce atom1 (atom 1)) | |
(defonce atom2 (atom 2)) | |
(defn handle-file [root stat next] | |
(println "handle file") |
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
(defprotocol View | |
"View abstraction" | |
(render [this some-param] "Renders view") | |
(destroy [_] "Destroys view, runs cleanup")) | |
(deftype ProjectView [data] | |
View | |
(render [this some-param] [:h1 (str "Hello " (:name data) " some param we passed in " some-param)]) | |
(destroy [_] (println "Cleaning up"))) |
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
## Using Emacs CIDER as the Figwheel REPL tool | |
project.clj should have this line: | |
``` | |
:figwheel { :nrepl-port 7888 } | |
``` | |
At the defproject-level. | |
It enables external tools to connect to the Figwheel REPL. To connect |
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
sailniir: @auramo http://shop.oreilly.com/product/0636920030867.do | |
Linux Device Drivers | |
Having already helped two generations of programmers explore Linux and write devices, the fourth edition of this classic book delves into tty, USB, and HCI devices such as keyboards, in addition to... | |
[12:27 PM] auramo: tost ajattelin kysyä, mut onkohan jo obsolete | |
[12:28 PM] sailniir: eli odottaa hän vielä vuosi ja 2 kuukautta kivasti ;-) | |
[12:28 PM] sailniir: mä kattelin vuodenvaihteessa että kesällä pitäis tulla toi neljäs editio, kesällä se oli sit tulossa lokakuussa, ja nyt tulossa Nov 2016 |
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
util.error: Use console.error instead | |
WARN: Condition always false [-:8426,6] | |
util.error: Use console.error instead | |
WARN: Dropping side-effect-free statement [-:8426,6] | |
util.error: Use console.error instead | |
WARN: Condition always false [-:8436,49] | |
util.error: Use console.error instead | |
WARN: Condition always false [-:8441,95] | |
util.error: Use console.error instead | |
WARN: Condition always false [-:8454,34] |
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
[Unit] | |
Description=Mailcatcher service | |
After=network.target | |
[Service] | |
WorkingDirectory=/opt/node/apps/hela-webapp | |
ExecStart=/usr/local/bin/mailcatcher -f --smtp-port 2155 --http-ip=0.0.0.0 --http-port 8181 --smtp-ip=0.0.0.0 | |
Restart=always | |
StandardOutput=syslog | |
StandardError=syslog |
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
var express = require('express'); | |
var app = express(); | |
app.use(express.static('public')); | |
app.listen(8000, function () { | |
console.log('Example app listening on port 8000!'); | |
}); |
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
// Map and flatMap for Options/Lists | |
scala> val myList : List[Option[Int]] = List(Some(1), None, Some(2)) | |
myList: List[Option[Int]] = List(Some(1), None, Some(2)) | |
scala> myList.flatten.map(x=>x*2) | |
res15: List[Int] = List(2, 4) | |
scala> myList.flatMap((x) => x.map(_*2)) | |
res16: List[Int] = List(2, 4) |