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
<appender name="SIFT" class="ch.qos.logback.classic.sift.SiftingAppender"> | |
<discriminator> | |
<key>target</key> | |
<defaultValue>unspecified</defaultValue> | |
</discriminator> | |
<sift> | |
<appender name="FILE-${target}" class="ch.qos.logback.core.FileAppender"> | |
<file>logs/target-${target}.log</file> | |
<append>false</append> | |
<encoder> |
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
{:dependencies | |
[[org.cloudhoist/pallet-jclouds "1.5.0-SNAPSHOT"] | |
[org.jclouds.provider/aws-ec2 "1.5.2"] | |
[org.jclouds.provider/aws-s3 "1.5.2"] | |
[org.jclouds.driver/jclouds-slf4j "1.5.2" | |
;; the declared version is old and can overrule the resolved version | |
:exclusions [org.slf4j/slf4j-api]] | |
[org.jclouds.driver/jclouds-sshj "1.5.2"]]} |
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
(let [s @(#'clojure.tools.nrepl.middleware.session/create-session | |
(:transport connection) | |
@(:bindings connection)) | |
out (#'clojure.tools.nrepl.middleware.session/session-out | |
:out new-session (:transport connection)) | |
err (#'clojure.tools.nrepl.middleware.session/session-out | |
:err new-session (:transport connection))] | |
....) | |
(binding [clojure.tools.nrepl.middleware.interruptible-eval/*msg* msg] |
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
# Kickstart file automatically generated by anaconda. | |
#version=DEVEL | |
install | |
cdrom | |
lang en_US.UTF-8 | |
keyboard us | |
network --onboot no --device eth0 --noipv4 --noipv6 --hostname fedora14 | |
timezone --utc America/New_York | |
rootpw --iscrypted $6$00UCp3lRIthvUZAl$VbwspY.v3TrfOfZ94VIAVobElrkB.txQHKo0m9j9SDm88qDUgWbQo59OxleWZ1b8eq7aH5QCkjdJSZuTSpYqr/ |
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
;; parse nested, punctuated lists in parsley | |
(def nested-list-parser | |
(parser | |
:expr #{:e1 [:expr "," :e1]} | |
:e1 #{"e" [:e1 ";" "e"]})) | |
(clojure.pprint/pprint (nested-list-parser "e;e;e,e;e")) |
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 myapp.authenticate.oauth | |
"OAuth authentication" | |
(:require | |
[cheshire.core :as json] | |
[clj-http.client :as http] | |
[clojure.string :as string] | |
[clojure.tools.logging :as logging]) | |
(:use | |
[oauthentic.core :only [build-authorization-url fetch-token]] | |
[ring.util.response :only [redirect]] |
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
<settings> | |
<profiles> | |
<profile> | |
<id>clojure-dev</id> | |
<pluginRepositories> | |
<pluginRepository> | |
<id>mulli.nu</id> | |
<url>http://mulli.nu/maven</url> | |
<layout>default</layout> | |
<snapshots> |
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
Caused by: java.lang.ClassCastException: org.apache.maven.repository.internal.MavenRepositorySystemSession cannot be cast to org.sonatype.aether.util.DefaultRepositorySystemSession | |
at cemerick.pomegranate.aether$repository_session.invoke(aether.clj:123) | |
at cemerick.pomegranate.aether$resolve_dependencies.doInvoke(aether.clj:399) | |
at clojure.lang.RestFn.applyTo(RestFn.java:137) | |
at clojure.core$apply.invoke(core.clj:600) | |
at cemerick.pomegranate$add_dependencies.doInvoke(pomegranate.clj:102) | |
at clojure.lang.RestFn.invoke(RestFn.java:1096) | |
at leiningen.core.classpath$get_dependencies.doInvoke(classpath.clj:107) | |
at clojure.lang.RestFn.applyTo(RestFn.java:142) | |
at clojure.core$apply.invoke(core.clj:604) |
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
(defn port-reachable? | |
([ip port timeout] | |
(let [socket (doto (java.net.Socket.) | |
(.setReuseAddress false) | |
(.setSoLinger false 1) | |
(.setSoTimeout timeout))] | |
(try | |
(.connect socket (java.net.InetSocketAddress. ip port)) | |
true | |
(catch java.io.IOException _) |
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
(action/def-bash-action install-deb | |
"Install a deb file. Source options are as for remote file." | |
[request deb-name & {:as options}] | |
(stevedore/do-script | |
(apply remote-file* request deb-name (apply concat options)) | |
(stevedore/checked-script | |
(format "Install deb %s" deb-name) | |
(dpkg -i --skip-same-version ~deb-name)))) |