Models | Examples |
---|---|
Display ads | Yahoo! |
Search ads |
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 '[clojure.string :as str] '[clojure.java.shell :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. http://goo.gl/kEolu." | |
[port bind-port!-fn & {:keys [max-attempts sleep-ms] |
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 hammock-cafe.ui.history | |
(:require [io.pedestal.app.protocols :as p] | |
[io.pedestal.app.util.log :as log] | |
[io.pedestal.app.messages :as msg])) | |
(def last-page (atom nil)) | |
(def dispatchers (atom {})) | |
(defn navigate [token] |
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
[defaults] | |
remote_user = vagrant | |
hostfile = .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory | |
private_key_file = ~/.vagrant.d/insecure_private_key |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Mind expanding programming languages
- C
- Common Lisp (via LISP)
- Dedalus (via Datalog)
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 '[datomic.api :as d]) | |
(defn entity-pull | |
"Like pull, but returns values consistent with d/entity, i.e., | |
entities with :db/ident are represented as keywords and sets are | |
used instead of vectors." | |
[db pat eid] | |
(->> (d/pull db pat eid) | |
(clojure.walk/prewalk | |
(fn [x] |