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 'tubular.core) | |
(tubular.core/connect "127.0.0.1" REPL_PORT) |
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
;; in project.clj | |
;; [org.clojure/clojurescript "0.0-2138"] | |
;; [org.clojure/core.async "0.1.267.0-0d7780-alpha"] | |
(ns checking-safari-leak.core | |
(:require | |
[cljs.core.async :as async | |
:refer [<! map< put! chan]]) | |
(:require-macros [cljs.core.async.macros :as m :refer [go alt! go-loop]])) |
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 'rubygems' | |
require 'fog' | |
require 'zerigo_dns' | |
# A simple script to help you leave zerigo behind | |
# it relies on the excellent fog library http://fog.io/dns/ | |
# It copies all of your Zerigo zones to DNSimple | |
# It is currently targeting DNSimple but fog supports many other |
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
(defn partition-chan | |
([start-pred in] (partition-chan start-pred (complement start-pred) in)) | |
([start-pred end-pred in] | |
(let [out (chan)] | |
(go | |
(loop [] | |
(if-let [val (<! in)] | |
(if (start-pred val) | |
(let [next-chan (chan)] | |
(>! out next-chan) |
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
(defn partition-chan | |
([start-pred in] (partition-chan start-pred (complement start-pred) in)) | |
([start-pred end-pred in] | |
(let [out (chan)] | |
(go | |
(loop [] | |
(if-let [val (<! in)] | |
(if (start-pred val) | |
(let [next-chan (chan)] | |
(>! out next-chan) |
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 tic-tac-toe) | |
(defn empty-board [size] | |
(let [row (vec (repeat size nil))] | |
(vec (repeat size row)))) | |
(defn prn-board [board] | |
(dorun (map prn board))) | |
(defn place [board row col marker] |
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
def assert(phrase, val) | |
puts (val && "p #{phrase}" || "FAIL #{phrase}") | |
end | |
@offsets = [[0,1], [1,0], [-1,1], [1,-1], [-1, 0], [0, -1], [1,1], [-1,-1]] | |
world = {} | |
def neighbors_coordinates(coord) | |
x,y = coord |
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 ^:shared continue-set-focus.behavior | |
(:require [clojure.string :as string] | |
[io.pedestal.app :as app] | |
[io.pedestal.app.messages :as msg] | |
[io.pedestal.app.util.log :as log])) | |
(defn set-value-transform [old-value message] | |
(:value message)) | |
(defn init-emitter [inputs] |