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 puffnfresh.core | |
| (:require-macros [puffnfresh.timeout :as timeout])) | |
| (defn -main [& args] | |
| (timeout/timeout-macro | |
| (prn "Hello") | |
| (prn "World") | |
| (prn "!"))) | |
| (set! *main-cli-fn* -main) |
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 seesaw.async | |
| (:use [seesaw core])) | |
| ; see http://dotnetslackers.com/articles/net/Programming-user-interfaces-using-f-sharp-workflows.aspx#1478 | |
| (defmacro async | |
| "Macro that executes an async call (the first form), ignores its result, and the | |
| executes the body normally." | |
| [async-call & body] | |
| `(~@(apply list (first async-call) `(fn [& args#] ~@body) (rest async-call)))) |
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
| (use 'hiccup.core) | |
| ;; **************************************************************** | |
| ;; The basics | |
| ;; **************************************************************** | |
| (html [:p]) | |
| => "<p />" | |
| ;; Any elements after that become the content of the tag |
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 pi.core | |
| (:use seesaw.core)) | |
| (native!) | |
| (def gap [:fill-h 5]) | |
| ; Set up the structure of the ui, giving widgets classes and ids as needed. | |
| (defn make-frame [] | |
| (frame |
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 distblast-cluster.vagrant | |
| (:require [pallet.compute :as compute] | |
| [pallet.phase :as phase] | |
| [pallet.core :as core] | |
| [pallet.utils :as utils] | |
| [pallet.compute.node-list :as node-list] | |
| [pallet.action.exec-script :as exec-script])) | |
| (defn test-script [session] | |
| (-> session |
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
| $ lein pallet converge staging.core/mongodb-cluster 1 | |
| WARN implementation - pallet.compute.vmfest provider failed to load: java.io.FileNotFoundException: Could not locate vmfest/virtualbox/virtualbox__init.class or vmfest/virtualbox/virtualbox.clj on classpath: (vmfest.clj:1) | |
| INFO core - retrieving nodes | |
| ERROR main - Exception | |
| java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException | |
| at clojure.lang.LazySeq.sval(LazySeq.java:47) | |
| at clojure.lang.LazySeq.seq(LazySeq.java:56) | |
| at clojure.lang.RT.seq(RT.java:450) | |
| at clojure.core$seq.invoke(core.clj:122) |
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 pallet.aether | |
| "Wrapper for aether resolution | |
| See: | |
| https://docs.sonatype.org/display/AETHER/Home" | |
| (:require | |
| [clojure.java.io :as io] | |
| [clojure.contrib.logging :as logging]) | |
| (import | |
| org.apache.maven.repository.internal.MavenRepositorySystemSession |
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
| (require 'pallet.compute) | |
| (def service (pallet.compute/service "your service name from config.clj here") | |
| (def security-group-client | |
| (.. | |
| (clojure.contrib.reflect/get-field | |
| org.jclouds.ec2.compute.EC2ComputeService "ec2Client" (.compute service)) | |
| getSecurityGroupServices)) | |
| (.createSecurityGroupInRegion security-group-client "us-east-1" "sg" "my new sg) |
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 staging.core | |
| (:require | |
| [pallet.core :as core] | |
| [pallet.compute :as compute] | |
| [pallet.resource :as resource] | |
| [pallet.stevedore :as stevedore] | |
| [pallet.crate.automated-admin-user :as automated-admin-user] | |
| [staging.crate.mongodb :as mongodb])) | |
| (def ec2-service |
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/sh | |
| LEIN_VERSION="1.6.0-SNAPSHOT" | |
| export LEIN_VERSION | |
| case $LEIN_VERSION in | |
| *SNAPSHOT) SNAPSHOT="YES" ;; | |
| *) SNAPSHOT="NO" ;; | |
| esac |