Skip to content

Instantly share code, notes, and snippets.

@talios
talios / gist:997662
Created May 29, 2011 11:19
Top Albums of 2011
American Heritage - Sedentary
Amon Amarth - Surtur Rising
Amorphis - The Beginning of Times
Arch Enemy - Khaos Legions
Avantasia - The Flying Opera ( Around The World in 20 Days )
Beardfish - Mammoth
Becoming The Archetype - Celestial Completion
Believer - Transhuman
Blackfield - Welcome To My DNA
Blood Ceremony - Living With The Ancients
@talios
talios / SomeOther.html
Created November 4, 2010 10:47
A new modification to my concordion eval command that now takes regex based templates
<html xmlns:concordion="http://www.concordion.org/2007/concordion"
xmlns:talios="http://www.talios.com/2010/concordion">
<head>Some Other Test</head>
<body>
<p class="info">
All tests are assumed to be run against username <b concordion:set="#username">username</b> and the password
<b concordion:set="#password">password</b>.
</p>
(require 'clojure.contrib.datalog.tests.test)
(require 'clojure.contrib.datalog.tests.test-database)
(require 'clojure.contrib.datalog.tests.test-literals)
(require 'clojure.contrib.datalog.tests.test-magic)
(require 'clojure.contrib.datalog.tests.test-rules)
(require 'clojure.contrib.datalog.tests.test-softstrat)
(require 'clojure.contrib.datalog.tests.test-util)
(require 'clojure.contrib.mock.test-adapter)
(require 'clojure.contrib.pprint.test-cl-format)
(require 'clojure.contrib.pprint.test-helper)
(deftest symbol-test
(defsymbolmacro sum-2-3 (plus 2 3))
(is (= (macroexpand '(with-symbol-macros (+ 1 sum-2-3)))
'(do (+ 1 (plus 2 3)))))
(is (= (macroexpand '(macrolet [(plus [a b] `(+ ~a ~b))] (+ 1 sum-2-3)))
'(do (+ 1 (clojure.core/+ 2 3)))))
(ns-unmap *ns* 'sum-2-3))
; Define the project and store in a variable
(def project (defproject "a:b:c"
:dependencies ["org.clojure:clojure:1.1.0-alpha-SNAPSHOT"
"org.clojure:clojure-contrib:1.0-SNAPSHOT"]))
; Use the provided API to easily add a new dependency programatically
(add-dependency! project "org.testng:testng:5.10")
; Return the project
project
Process: iTunes [224]
Path: /Applications/iTunes.app/Contents/MacOS/iTunes
Identifier: com.apple.iTunes
Version: 9.0 (9.0)
Build Info: iTunes-9007001~2
Code Type: X86 (Native)
Parent Process: launchd [191]
Date/Time: 2009-09-15 08:01:10.061 +1200
OS Version: Mac OS X 10.6.1 (10B504)
perelandra-2:~ amrk$ sudo port install -f ncurses
---> Computing dependencies for ncurses
---> Building ncurses
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_ncurses/work/ncurses-5.7" && /usr/bin/make -j2 all " returned error 2
Command output: ../c++/cursesm.cc: In member function 'bool NCursesMenu::set_pattern(const char*)':
../c++/cursesm.cc:229: error: 'OnError' was not declared in this scope
../c++/cursesm.cc: In member function 'virtual int NCursesMenu::driver(int)':
../c++/cursesm.cc:247: error: 'OnError' was not declared in this scope
../c++/cursesf.cc: In member function 'void NCursesForm::InitForm(NCursesFormField**, bool, bool)':
../c++/cursesf.cc:121: error: 'OnError' was not declared in this scope
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>clojure-test</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>clojure-test</name>
<url>http://maven.apache.org</url>
<dependencies>
public class WhenRanAssertion implements AssertExtension {
private Runnable runnable;
private String description;
WhenRanAssertion(Runnable runnable) {
this.runnable = runnable;
this.description = "A runnable";
}
package nz.co.smx.smx3.concordion;
import org.concordion.api.*;
import org.concordion.internal.ConcordionBuilder;
public class BasicConcordionRunner implements Runner {
public RunnerResult execute(Resource resource, String href) throws Exception {
Resource hrefResource = resource.getParent().getRelativeResource(href);