Skip to content

Instantly share code, notes, and snippets.

Avatar

Ian Eslick eslick

View GitHub Profile
@eslick
eslick / Ansible ping
Created Jun 20, 2013
Ping all entries in the ansible hosts file
View Ansible ping
ansible all -m ping --ask-pass
@eslick
eslick / datomic-schema.clj
Last active May 6, 2016
One solution to integrating Schema and Datomic
View datomic-schema.clj
(in-ns test
(:require
[schema.macros :as macros]
[schema.utils :as sutils]))
;; Wrapper type needed because Entity values do not implement
;; IPersistentMap interface
(defrecord EntitySchema
[schema]
Schema
@eslick
eslick / gist:8447415
Created Jan 16, 2014
Output from running upstart script
View gist:8447415
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /var/lib/immutant/current/jboss
JAVA: java
JAVA_OPTS: -server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=
org.jboss.byteman -Djava.awt.headless=true
@eslick
eslick / gist:8420061
Created Jan 14, 2014
Interesting stack trace from my CI server from lein immutant test AFTER a successful test run (0 failures, etc).
View gist:8420061
Stopping JBoss
java.io.IOException: Premature EOF
at sun.net.www.http.ChunkedInputStream.readAheadBlocking(ChunkedInputStream.java:565)
at sun.net.www.http.ChunkedInputStream.readAhead(ChunkedInputStream.java:609)
at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:696)
@eslick
eslick / gist:7087091
Created Oct 21, 2013
Switchboard project.clj
View gist:7087091
(defproject switchboard "0.8.0-SNAPSHOT"
:description "Real-Time Healthcare"
:url "http://swb.io"
:license {:name "To Be Determined"}
:min-lein-version "2.0.0"
:main ^{:skip-aot true} switchboard.server
:resource-paths ["config", "resources"]
:aliases {"cas-dev" ["trampoline" "run" "-m" "switchboard.db.cassandra-test/start-embedded-server"]}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/core.async "0.1.242.0-44b1e3-alpha"]
@eslick
eslick / gist:7086897
Created Oct 21, 2013
Lein deps tree for pedestal-based immutant app
View gist:7086897
Bacon:switchboard eslick$ lein deps :tree
WARNING!!! possible confusing dependencies found:
[io.pedestal/pedestal.service "0.2.1"] -> [org.slf4j/slf4j-api "1.7.2"]
overrides
[com.datomic/datomic-pro "0.8.4143"] -> [org.slf4j/jul-to-slf4j "1.7.5"] -> [org.slf4j/slf4j-api "1.7.5"]
and
[com.datomic/datomic-pro "0.8.4143"] -> [org.slf4j/log4j-over-slf4j "1.7.5"] -> [org.slf4j/slf4j-api "1.7.5"]
and
[com.datomic/datomic-pro "0.8.4143"] -> [org.slf4j/jcl-over-slf4j "1.7.5"] -> [org.slf4j/slf4j-api "1.7.5"]
@eslick
eslick / gist:7086815
Created Oct 21, 2013
Immutant logging profile
View gist:7086815
<subsystem xmlns="urn:jboss:domain:logging:1.2">
<console-handler name="CONSOLE">
<level name="DEBUG"/>
<formatter>
<pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
</console-handler>
<periodic-rotating-file-handler name="FILE" autoflush="true">
<level name="TRACE"/>
<formatter>
@eslick
eslick / gist:6909886
Created Oct 9, 2013
Immutant test application fails to startup when co-deployed with Immutant 'dummy' application for nrepl use
View gist:6909886
15:44:58,546 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "dummy.clj" (runtime-name : "dummy.clj")
15:48:29,055 INFO [org.jboss.as.repository] (HttpManagementService-threads - 3) JBAS014900: Content added at location /Users/eslick/.immutant/current/jboss/standalone/data/content/46/a044e91a04105e22e3cbb90a36cea84c7bcdac/content
15:48:29,062 INFO [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015876: Starting deployment of "switchboard.clj" (runtime-name: "switchboard.clj")
15:48:35,024 WARN [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015960: Class Path entry apache-cassandra-clientutil-1.2.6.jar in /Users/eslick/Work/vital/projects/switchboard/switchboard/tmp_mounts/switchboard.clj/cassandra-all-1.2.6.jar does not point to a valid jar for a Class-Path reference.
15:48:35,047 WARN [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015960: Class Path entry apache-cassandra-thrift-1.2.6.jar in /Users/eslick/Work/vital/projects/sw
@eslick
eslick / gist:6886353
Created Oct 8, 2013
Stacktrace from maven: mvn -e -s support/settings.xml install
View gist:6886353
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Immutant App Bootstrap Module 1.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-java-version) @ immutant-bootstrap-module ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven-version) @ immutant-bootstrap-module ---
[INFO]
[INFO] --- buildnumber-maven-plugin:1.2:create-timestamp (get-build-timestamp) @ immutant-bootstrap-module ---
@eslick
eslick / Ansible Environment
Created Jun 21, 2013
Ansible Setup for AWS
View Ansible Environment
cd ansible # run in the ansible directory
export AWS_ACCESS_KEY_ID='<aws_accesskey_id>'
export AWS_SECRET_ACCESS_KEY='<aws_secret_key>'
export ANSIBLE_HOSTS=$(pwd)/plugins/inventory/ec2.py
# use the following only if you're using ssh as transport (typical)
export ANSIBLE_SSH_ARGS="-o ForwardAgent=yes"
# Run ssh-agent and add your AWS pem key