The project can be built using Lumo
npm install -g lumo-cljs
lumo build.cljs
| ;; In Pedestal 0.3.1, you won't have to use an atom. | |
| ;; You'll pass the channel into the SSE creation function (instead of it passing one back to you) | |
| (def event-ch (atom nil)) | |
| (defn home-page | |
| [request] | |
| (ring-resp/response "Hello World!")) | |
| (defroutes routes | |
| [[["/" {:get home-page} |
| (import 'org.apache.commons.mail.SimpleEmail) | |
| (doto (SimpleEmail.) | |
| (.setHostName "smtp.gmail.com") | |
| (.setSslSmtpPort "465") | |
| (.setSSL true) | |
| (.addTo "you@gmail.com") | |
| (.setFrom "you@gmail.com" "Lucky Clojurian") | |
| (.setSubject "Hello from clojure") | |
| (.setMsg "Wasn't that easy?") | |
| (.setAuthentication "you@gmail.com" "yourpassword") |
| (defn fizzbuzz | |
| "Prints the numbers from 1 to 100. But for multiples of three prints | |
| 'Fizz' instead of the number and for the multiples of five prints | |
| 'Buzz'. For numbers which are multiples of both three and five prints | |
| 'FizzBuzz'" | |
| [] | |
| (doall | |
| (map | |
| #(println | |
| (some |
| (ns react-cljs.core | |
| (:require React)) | |
| (declare render) | |
| (defn handle-change [e] | |
| (render {:text (.. e -target -value)})) | |
| (defn render [{:keys [text]}] | |
| (React/renderComponent |
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| # Parsea la página de busquedas de DailyMotion para encontrar | |
| # episodios de Detective Conan, busca las URL y las imprime, | |
| # para usar junto con JDownloader | |
| import urllib2 | |
| import time | |
| from BeautifulSoup import BeautifulSoup |
| (ns blog.errors.core | |
| (:require-macros | |
| [cljs.core.async.macros :refer [go]] | |
| [blog.utils.macros :refer [<?]]) | |
| (:require | |
| [cljs.core.async :refer [>! <! chan close!]])) | |
| ;; convert Node.js async function into a something | |
| ;; that returns a value or error on a channel | |
| (defn run-task [f & args] |
| // installed Clojure packages: | |
| // | |
| // * BracketHighlighter | |
| // * lispindent | |
| // * SublimeREPL | |
| // * sublime-paredit | |
| { | |
| "word_separators": "/\\()\"',;!@$%^&|+=[]{}`~?", | |
| "paredit_enabled": true, |
| Check out README.md to get started editing Clojure with Emacs. |
| import org.apache.commons.math3.analysis.interpolation.NevilleInterpolator; | |
| public class WtfCreator { | |
| public static void main(String[] args) { | |
| var text = "Hello, world!\n"; | |
| double[] x = new double[text.length() + 1]; | |
| double[] y = new double[text.length() + 1]; | |
| for(var i = 0; i < text.length(); i++) { | |
| x[i] = i; |
The project can be built using Lumo
npm install -g lumo-cljs
lumo build.cljs