This file contains hidden or 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 conways.core | |
(:use midje.sweet) | |
(:require [clojure.set :as s])) | |
(unfinished ) | |
(def offsets [-1 0 1]) | |
(defn neighbors [[x y]] | |
(s/difference (set (for [x-offset offsets y-offset offsets] | |
[(+ x x-offset) |
This file contains hidden or 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
(defproject floyd "0.10.4-SNAPSHOT" | |
:dependencies ... | |
;; compile this one file | |
:aot [floyd.version] | |
) |
This file contains hidden or 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
;; Really debug.cljs | |
(ns floyd.debug | |
(:require [goog.events :as events] | |
[goog.object :as o] | |
[goog.debug.Console :as Console] | |
[goog.debug.LogManager :as LogManager] | |
[goog.debug.Logger :as Logger] | |
[goog.ui.Component.EventType :as et] | |
[goog.events.EventType :as EventTypes])) |
This file contains hidden or 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 custom-button [parent text] | |
(let [container (html/el "span") | |
button (goog.ui.CustomButton. text)] | |
(dom/append parent container) | |
(.render button container) | |
{:element container :component button})) |
This file contains hidden or 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 treeviewer.core | |
(:require [goog.dom :as dom] | |
[goog.ui.tree.TreeControl :as TreeControl])) | |
(def data {:a 1 :b [1 2] :c {:d 1 :e 2 :f "foo"}}) | |
(declare add-data) | |
(defn tree-control [] | |
(goog.ui.tree.TreeControl. |
This file contains hidden or 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
floyd = { | |
'staging': { | |
'cron.d': ['*/10 * * * * deploy java "-Duser.timezone=US/Central" -server -Xmx1024M -cp /apps/floyd/floyd-standalone.jar clojure.main /apps/floyd/cisco_import.clj >> /apps/floyd/cisco_import.log 2>&1'], | |
'scripts': ['cisco_import.clj', 'run.clj'], | |
'nginx' : { | |
'server_name': 'stage.floyd.dev.notifymd.local', | |
'port': 8080 | |
} | |
'supervisord' : { | |
'mx' = '1024M' |
This file contains hidden or 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
# Make it use C-a, similar to screen.. | |
unbind C-b | |
unbind l | |
set -g prefix C-o | |
bind-key C-o last-window | |
# Reload key | |
bind r source-file ~/.tmux.conf | |
set -g default-terminal "screen-256color" |
This file contains hidden or 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 higer-order | |
(:use midje.sweet)) | |
(defn sum-with [f vs] | |
(apply + (map f vs))) | |
(defn double [x] | |
(* x 2)) | |
(defn sum-double [xs] |
This file contains hidden or 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
;; http://mihai.bazon.net/projects/editing-javascript-with-emacs-js2-mode | |
(defun my-js2-indent-function () | |
(interactive) | |
(save-restriction | |
(widen) | |
(let* ((inhibit-point-motion-hooks t) | |
(parse-status (save-excursion (syntax-ppss (point-at-bol)))) | |
(offset (- (current-column) (current-indentation))) | |
(indentation (espresso--proper-indentation parse-status)) | |
node) |
This file contains hidden or 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 pfad.ch1) | |
(set! *warn-on-reflection* true) | |
;; Compute the smallest natural number not in a given finite set of X | |
;; natural numbers. | |
;; Array based solution | |
;; minfree = search . checklist |