(define (make-link x)
`(a [[href "#top"] [class "internal"]]
,(splice x)))
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 print_target_moves(aTimeCapacity, bTimeCapacity, targetTime): | |
''' | |
Given two hourglasses with respective time capacities, | |
print out a process for measuring the given target time | |
without going over that time. | |
An hour glass can only be flipped when any of them have run out. | |
TODO: generalize to multiple hour-glasses | |
''' | |
moves = [] |
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
% the tile width of the rectangular map | |
#const width=4. | |
positions(0..11). | |
rotations(0..3). | |
% piece(number, side, side type [g=grass, w=water, c=city, r=road]). | |
piece( 1,0,g ;; 1,1,g ;; 1,2,g ;; 1,3,w). | |
piece( 2,0,g ;; 2,1,g ;; 2,2,g ;; 2,3,w). | |
piece( 3,0,g ;; 3,1,w ;; 3,2,g ;; 3,3,w). |
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
entries = getListOfTableEntriesSomeWhere() | |
entryTree = MyTree(entries) | |
################################ | |
def group_entries(groupclass, entries, keyfunc): | |
return [groupclass(k,g) for k,g in itertools.groupby(entries,keyfunc)] | |
key_sys = lambda x: x.sys | |
key_subsys = lambda x: x.subsys |
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 foo| (bar | |
baz)) |
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
$ node test/perf.js | |
Testing file with 2865 lines | |
indent: 62.065ms | |
paren: 52.131ms | |
$ /usr/sbin/system_profiler SPHardwareDataType | |
Hardware Overview: | |
Model Name: MacBook Pro |
-
item 1
-
item 2
-
item 3
// code here
should be equivalent to...
- item 1
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
if [ ! -f .classpath ]; then | |
classpath=`boot show -c | tee .classpath` | |
else | |
classpath=`cat .classpath` | |
fi | |
planck -c $classpath ... |
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 sitegen.markdown | |
(:require | |
[clojure.string :as string] | |
[planck.core :refer [file-seq slurp]] | |
[clojure.walk :refer [keywordize-keys]])) | |
(def ^:dynamic *filename*) | |
(defn error [msg] | |
(throw (str "markdown metadata error: " msg " - " *filename*))) |
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 sitegen.markdown | |
(:require | |
[clojure.string :as string] | |
[planck.core :refer [file-seq slurp]] | |
[clojure.walk :refer [keywordize-keys]] | |
[cljs.pprint :refer [pprint]])) | |
(def ^:dynamic *filename*) | |
(defn error [msg] | |
(throw (str "markdown metadata error: " msg " - " *filename*))) |