Skip to content

Instantly share code, notes, and snippets.

View dluksza's full-sized avatar

Dariusz Łuksza dluksza

View GitHub Profile
@dluksza
dluksza / gist.clj
Last active August 29, 2015 14:14
Enlive template with dynamic forms list
(ns web-app-base.gist
(:require [net.cgrand.enlive-html :as enlive]
[clojure.test :refer :all]))
;; test template
(def tpl
"<h1>h1 content</h1><h2>h2 content</h1>")
;; test translation map
(def i18n
@dluksza
dluksza / Saper.fan
Created February 29, 2012 09:46
Simple minefield parser in Fantom
class Parser {
Str parse(Str input) {
lines := input.splitLines
validateInput(lines)
result := createMatrix(lines.size, lines[0].size)
lines.each |line, i| {
parseLine(line, result, i);
}