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
#!/bin/bash | |
pidfile=$WHERE_YOUR_PIDFILE_IS_LOCATED | |
if [ -e $pidfile ]; then | |
pid=`cat $pidfile` | |
if kill -0 >/dev/null 2>&1 $pid; then | |
echo "Already running" | |
exit 1 | |
else | |
rm $pidfile | |
fi |
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 serv (:use compojure)) | |
(defroutes greetings | |
(GET "/" | |
(html [:h1 "Hello World"])) | |
(ANY "*" | |
(page-not-found))) | |
(def server (run-server {:port 8080} "/*" (servlet greetings))) |
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 test-clean | |
(:refer-clojure :exclude [compile]) | |
(:use [leiningen.core :only [read-project defproject]] | |
[leiningen.deps :only [deps]] | |
[leiningen.clean :only [clean]] | |
[leiningen.compile :only [compile]] :reload-all) | |
(:use [clojure.test] | |
[clojure.contrib.set] | |
[clojure.contrib.java-utils :only [file]])) |
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
(defn mystr | |
"With no args, returns the empty string. With one arg x, returns | |
x.toString(). (str nil) returns the empty string. With more than | |
one arg, returns the concatenation of the str values of the args." | |
{:tag String} | |
([] (println "0:") | |
"") | |
([#^Object x] (println "1: x:" x) | |
(if (nil? x) "" (. x (toString)))) | |
([x & ys] (println "2: x: " x ", ys: " ys) |
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
diff --git a/project.clj b/project.clj | |
index adac2b2..3c05f8f 100644 | |
--- a/project.clj | |
+++ b/project.clj | |
@@ -1,6 +1,6 @@ | |
(defproject fnparse "2.2.4" | |
:description "A library for creating functional parsers in Clojure." | |
- :dependencies [[org.clojure/clojure "1.0.0"] | |
- [org.clojure/clojure "1.0.0-SNAPSHOT"]] | |
+ :dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"] |
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
<dependency> | |
<groupId>com.sun.grizzly.osgi</groupId> | |
<artifactId>grizzly-httpservice</artifactId> | |
<version>1.9.9-SNAPSHOT</version> | |
<!-- Or for latest released version RELEASE --> | |
</dependency> |
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
<dependency> | |
<groupId>com.sun.grizzly.osgi</groupId> | |
<artifactId>grizzly-httpservice-bundle</artifactId> | |
<version>1.9.9-SNAPSHOT</version> | |
<!-- Or for latest released version RELEASE --> | |
</dependency> |
NewerOlder