Skip to content

Instantly share code, notes, and snippets.

@aemkei
aemkei / LICENSE.txt
Created August 30, 2011 08:50 — forked from 140bytes/LICENSE.txt
Leading Zeros - 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@hdenk
hdenk / build.gradle
Created February 8, 2011 03:37
clojure webapp with http-authentication using ring/moustache, deployable as foo.war
// gradle-build that uses meikel brandmeyers clojure-plugin for gradle (clojuresque)
// see http://bitbucket.org/kotarak/clojuresque
// use a standard maven directory-layout -> /src/main/clojure, /src/main/webapp
apply plugin: 'clojure'
apply plugin: 'war'
apply plugin: 'project-report'
warnOnReflection = false
aotCompile = true // needed for gen-class in servlet.clj
(ns clj-play.aleph
(:use aleph))
(defn hello-world [request]
(respond! request
{:status 200
:headers {"Content-Type" "text/html"}
:body "Hello Clojure!"}))
(run-aleph hello-world {:port 8080})
@minimal
minimal / jetty.clj
Created January 20, 2010 01:17
Websockets with clojure + jetty
;; Copyright (c) James Reeves. All rights reserved.
;; The use and distribution terms for this software are covered by the Eclipse
;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which
;; can be found in the file epl-v10.html 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.
(ns compojure.server.jetty
"Clojure interface to start an embedded Jetty server."