Skip to content

Instantly share code, notes, and snippets.

Avatar

Hugo Duncan hugoduncan

View GitHub Profile
@hugoduncan
hugoduncan / plan.clj
Created Apr 9, 2014
pallet use-async api example
View plan.clj
(ns pallet.api-examples.plan
"Examples of pallet's plan api"
(:refer-clojure :exclude [sync])
(:require
[pallet.actions :refer [exec-script*]]
[pallet.core.executor.ssh :refer [ssh-executor]]
[pallet.plan :refer [execute-plan execute-plans plan-fn]]
[pallet.session :as session :refer [set-user]]
[pallet.user :refer [default-user]]
[pallet.utils.async :refer [sync]]))
@hugoduncan
hugoduncan / plugin.clj
Created Apr 10, 2014
add profiles in leiningen plugin
View plugin.clj
(ns lein-test-env.plugin)
(def profiles
{:aws {:pallet/test-env {}
:dependencies '[[com.palletops/pallet-aws "0.2.0"]
[ch.qos.logback/logback-classic "1.1.1"]
[org.slf4j/jcl-over-slf4j "1.7.6"]]}})
(defn middleware
"Middleware to add test-env profiles"
View support_test.clj
(ns pallet.crate.maven.support-test
(:require
[clojure.test :refer :all]
[pallet.actions :refer [exec-checked-script exec-script* minimal-packages
package-manager]]
[pallet.api :refer [converge group-spec plan-fn]]
[pallet.build-actions :refer [build-actions build-session]]
[pallet.core.api :refer [phase-errors]]
[pallet.core.session :refer [with-session]]
[pallet.crate :refer [is-64bit?]]
View *shell*<2>.txt
$ lein2 modules test
------------------------------------------------------------------------
Module build order:
pallet-test-env-parent
lein-test-env
pallet-test-env
------------------------------------------------------------------------
Building pallet-test-env-parent 0.1.2-SNAPSHOT (default)
------------------------------------------------------------------------
Using JLine for console I/O; install rlwrap for optimum experience.
View *shell*.txt
{:results ({:type :pass, :selector :amzn-linux-2013-092, :service :pallet-ec2, :feature ("default-settings" "install maven")}), :date "20140410T213008.035Z", :untested (:ubuntu-10-04 :ubuntu-12-04 :ubuntu-13-04 :ubuntu-13-10 :centos-6-5 :debian-7-4 :debian-6-0)}
View *scratch*.el
java.net.SocketException: Connection reset
java.net.SocketInputStream.read SocketInputStream.java: 196
java.net.SocketInputStream.read SocketInputStream.java: 122
sun.reflect.NativeMethodAccessorImpl.invoke0 NativeMethodAccessorImpl.java
sun.reflect.NativeMethodAccessorImpl.invoke NativeMethodAccessorImpl.java: 57
sun.reflect.DelegatingMethodAccessorImpl.invokeDelegatingMethodAccessorImpl.java: 43
java.lang.reflect.Method.invoke Method.java: 606
clojure.lang.Reflector.invokeMatchingMethod Reflector.java: 93
clojure.lang.Reflector.invokeInstanceMethod Reflector.java: 28
pallet.docker.api/read-r
View docudata.clj
{:namespaces ({:vars ({:ns palletops.hyde,
:name gemfile,
:file "palletops/hyde.clj",
:column 1,
:line 65,
:var-type :fn,
:arglists ([config])}
{:ns palletops.hyde,
:name clean-target,
:file "palletops/hyde.clj",
View docudata.clj
{:namespaces ({:vars ({:ns hyde-pallet-crate.core,
:name build-site,
:file "hyde_pallet_crate/core.clj",
:column 1,
:line 61,
:var-type :fn,
:arglists ([root jekyll-config site-config])}
{:ns hyde-pallet-crate.core,
:name site-config,
:file "hyde_pallet_crate/core.clj",
View logback-test.xml
<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>
@hugoduncan
hugoduncan / core-docker.service
Last active Aug 29, 2015
Fleet services for switching to latest docker on CoreOS, and back again
View core-docker.service
# core-docker.service
# Fleet global unit to restore docker to the CoreOS version
[Unit]
Wants=docker.service
After=docker.service
[Service]
Type=oneshot
ExecStart=/usr/bin/rm -f /run/systemd/system/docker.service.d/10-start.conf
You can’t perform that action at this time.