Inspired by "Parsing CSS with Parsec".
Just quick notes and code that you can play with in REPL.
By @kachayev
<div class =container> </div> |
Inspired by "Parsing CSS with Parsec".
Just quick notes and code that you can play with in REPL.
By @kachayev
;; (c) 2016 Stefan Kamphausen | |
;; Released under the Eclipse Public License as is common in the Clojure world. | |
;;; Summary | |
;; This gist shows how you can implement GitHub webhook validation as a Clojure ring middleware. | |
;;; Description | |
;; It is not a ready-made solution that you can just plug into your code. It makes some assumptions that | |
;; may or may not be valid in your situation. I don't want to turn this into a full-blown generic | |
;; open source library because of this. Instead I provide this gist so that you can take the parts |
Instead of using vars in React Native Hiccup, it would be interesting to use keywords.
Consider the way things are currently done:
(def ReactNative (js/require "react-native"))
(def text (r/adapt-react-class (.-Text ReactNative)))
(defn greeting []
[text "Hello"])
(ns morel.core | |
(:import (com.oracle.truffle.api.nodes RootNode NodeInfo Node$Child)) | |
(:require [clojure.interop :refer [defclass]] | |
[clojure.reflect :as reflect])) | |
(defclass | |
^{NodeInfo {:language "SL" | |
:description "The root of all SL execution trees"}} | |
SLRootNode [language | |
frame-descriptor |
Rich Hickey Q&A by Michael Fogus
Best known as the inventor of Clojure, a Lisp that runs on the Java Virtual Machine and the first new member of the Lisp family to attract any widespread interest since Scheme and Common Lisp, Rich Hickey has been a software developer and consultant for two decades.
Prior to starting work on Clojure, he made four attempts to combine Lisp with either Java or Microsoft’s Common Language Runtime: jfli, Foil, Lisplets, and DotLisp but Clojure was the first to draw significant attention. To date there have been four books published on Clojure, including The Joy of Clojure by interviewer Michael Fogus. The first Clojure conference, ClojureConj held in 2010, drew over two hundred attendees. And the Clojure Google group has, as of this writing, 4,880 members who have posted over 46,000 mes
(ns ansible.core | |
(:require [clojure.java.shell :as sh] | |
[clojure.string :as str] | |
[cheshire.core :as cheshire] | |
[clojure.java.io :as io]) | |
(:import (java.io File) | |
(com.fasterxml.jackson.core JsonGenerator) | |
(java.util Base64) | |
(java.security MessageDigest MessageDigest$Delegate))) |
(ns lucenalog.core | |
"Lucenalog = Datalog interface to Lucene in 10 lines. | |
Simple but powerful. | |
Use | |
(db/add (index) {:a \"foo\" :b \"bar\"}) | |
to index a map with Lucene. Then you can use the relation |
This gist walks you through the steps of setting up a storage for your datomic starter instance to use an HSQLDB instance (running as a standalone server - i do not address embedded, http, in memory or other forms of the server). I am sure the same can be applied to any other SQL based storage so it should be portable to Apache Derby. I am writing this for those who may find it useful in getting this done quickly without spending a week as I did trying to figure out what I was doing wrong.
(ns general.replace | |
(:require [clojure.string :as s] | |
[clojure.java.io :as io] | |
[clojure.pprint :as pp])) | |
(defn indexes-of [in-str find-str] | |
(loop [idx 0 | |
indexes []] | |
(let [found-idx (s/index-of in-str find-str idx)] | |
(if found-idx |