Skip to content

Instantly share code, notes, and snippets.

View core.cljs
(ns react-cljs.core
(:require React))
(declare render)
(defn handle-change [e]
(render {:text (.. e -target -value)}))
(defn render [{:keys [text]}]
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active Oct 22, 2021
Steps to install a Comodo PositiveSSL certificate with Nginx.
View install-comodo-ssl-cert-for-nginx.rst

Setting up a SSL Cert from Comodo

I use as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

View client.cljs
(def cds (collection))
;; interact with database
(>! (:in cds)
{:op :create
:val {:title "Soft Machine Vol. 1"
:artist "Soft Machine"
:year 1969}})
View radical.cljs
(ns async-test.core
(:require [cljs.core.async :refer [chan]]
[clojure.string :as string])
[cljs.core.async.macros :as m :refer [go alt! alts!]]))
(def c (chan))
(def loc-div (.getElementById js/document "location"))
(.addEventListener js/window "mousemove"

Auto Synchronized Backups with Bittorrent sync & a vps

1. Cloud syncing on the cheap

Two awsome things were released yesterday :

Compare this to the pricing of : dropbox pro

a2ndrade / gist:5234370
Last active Mar 15, 2019
Datomic Pro Setup: MySQL
View gist:5234370
# download
unzip & cd datomic-pro-X.X
# install as a maven artifact
# configure
cp config/samples/
# protocol=sql
stuarthalloway / gist:5199642
Created Mar 19, 2013
Draw a pedestal dataflow with dorothy + Graphviz
View gist:5199642
;; from leiningen, use [dorothy/dorothy "0.0.3"]
(require '[dorothy.core :as dot])
;; dataflow copied from chat
(def dataflow '{:transform
{:outbound {:init {} :fn outbound-transform}
:inbound {:init {} :fn inbound-transform}
:nickname {:init nil :fn nickname-transform}}
:effect {:outbound send-message-to-server}
View gist:5075355
My thoughts on writing tiny reusable modules that each do just one
thing. These notes were adapted from an email I recently sent.
If some component is reusable enough to be a module then the
maintenance gains are really worth the overhead of making a new
project with separate tests and docs. Splitting out a reusable
component might take 5 or 10 minutes to set up all the package
overhead but it's much easier to test and document a piece that is
ptaoussanis / free-port.clj
Created Dec 14, 2012
A little utility to allow simple redeployment of Clojure web servers with zero downtime, and without the need for a proxy or load balancer. Just wrap any port-binding calls, and the utility will auto kill pre-existing servers as necessary. *nix only. Based on the blog post by Feng Shen,
View free-port.clj
;; (require '[clojure.string :as str] '[ :as shell] '[taoensso.timbre :as timbre])
(defn with-free-port!
"Attempts to kill any current port-binding process, then repeatedly executes
nullary `bind-port!-fn` (which must return logical true on successful
binding). Returns the function's result when successful, else throws an
exception. *nix only.
This idea courtesy of Feng Shen, Ref."
[port bind-port!-fn & {:keys [max-attempts sleep-ms]
View gist:4262177
#lang r5rs
(define-syntax var
(syntax-rules ()
((_ x) (vector x))))
(define-syntax var?
(syntax-rules ()
((_ x) (vector? x))))