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
;; deps.edn | |
{:paths ["src"] | |
:deps {org.clojure/clojure {:mvn/version "1.11.2"} | |
ring/ring-core {:mvn/version "1.12.1"} | |
ring/ring-devel {:mvn/version "1.12.1"} | |
http-kit/http-kit {:mvn/version "2.8.0"} | |
compojure/compojure {:mvn/version "1.7.1"} | |
rum/rum {:mvn/version "0.12.11" | |
:exclusions [cljsjs/react cljsjs/react-dom]}} |
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
(require 'package) | |
(add-to-list 'package-archives | |
'("marmalade" . "http://marmalade-repo.org/packages/")) | |
(package-initialize) | |
(defvar my-packages '(clojure-mode | |
cider | |
paredit | |
auto-complete | |
highlight-parentheses |
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
/** Assume database returns data for tasks, we may | |
* model each task as an object, and use React for the view. | |
**/ | |
/** | |
* Simple component that accepts data for a task, and returns markup for it | |
**/ | |
function Task({name, finished, reminderDateTime, dueDate}) { | |
return ( | |
<fieldset> |
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 messagepassing.core) | |
(import [java.util.concurrent LinkedTransferQueue]) | |
(def m 10000000) | |
(defn queue-test [] | |
(defn bounce [in out m] | |
(let [value (.take in)] | |
(if (< value m) | |
(do |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; Copyright (c) Rich Hickey. All rights reserved. | |
; The use and distribution terms for this software are covered by the | |
; Common Public License 1.0 (http://opensource.org/licenses/cpl.php) | |
; which can be found in the file CPL.TXT at the root of this distribution. | |
; By using this software in any fashion, you are agreeing to be bound by | |
; the terms of this license. | |
; You must not remove this notice, or any other, from this software. | |
;dimensions of square world |
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
# Curl online manpages and pipe to less | |
webman () { | |
curl http://man.he.net/\?topic\=$1\§ion\=all | less | |
} | |
# Calls man pages or fallbacks to webman | |
man() | |
{ | |
echo "Fetching man page for $1 ..." |
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
sudo fgrep --exclude=\*.{db,json,so,jar,sig,log,md,edn,patch,class,css,scssc} --exclude-dir=".git" -rnw "." -e "hammer" -e "dragon" -e "plz" -e "crazy" -e "dont look here" -e "please ignore" -e "horrible" -e "horrid" -e "hideous" -e "nonsense" -e "fack" -e "hack" / 2>&1 | tee -a very-telling.txt |
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
render(){ | |
const { flashState } = this.props; | |
return ({ | |
({ // switch | |
SUCCESS: () => (<Component1 />), | |
INFO: () => (<Component2 />), | |
WARNING: () => (<Component3 />) }[flashState] || | |
(() => (<DefaultComponent />)))() // DEFAULT | |
}); |