Skip to content

Instantly share code, notes, and snippets.


Ian Eslick eslick

View GitHub Profile
eslick / gist:855663
Created Mar 4, 2011
An example custom HBase Sink for Flume written in Clojure
View gist:855663
;; Flume HBase User Sink
:name compass.flume.UserSink
:extends "com.cloudera.flume.core.EventSink$Base"
:prefix "sink-"
:main false
:constructors {[String] []
eslick / election.clj
Created Oct 30, 2012
A simple election mechanism for Datomic peers
View election.clj
;; This is a relatively simple election mechanism for a set of
;; processes or datomic peers where a processing step requires a
;; global master. The elector entity is used to connect a set of peer
;; entities labeled as :election/master. Using the algorithm,
;; there will only ever be one :election/master in the :election/peer
;; group defined on the elector.
;; The user API is simple a guarded transaction which calls a txn-fn
;; if the entity is the current master. If not it holds an election
;; if the timeout has expired.
eslick / reserve.clj
Created Nov 21, 2012
Simple reservation for multiple worker peers using Datomic
View reserve.clj
(ns experiment.infra.election
(:use [datomic.api :only [q] :as d])
(:require [experiment.system :as sys]
[ :as data]
[experiment.infra.protocols :as p]))
;; Reserve - Simple peer coordination mechanism
;; Reservations support multiple peers trying to distribution operations
eslick / profiles.clj
Last active Dec 17, 2015
ritz middleware in profiles.clj
View profiles.clj
{:user {:plugins [[lein-ritz "0.7.0"]]
:dependencies [[nrepl-inspect "0.3.0"]
[ritz/ritz-nrepl-middleware "0.7.0"]]
eslick / Vagrantfile
Created May 20, 2013
Vagrant file for a test Ubuntu Box
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby : do |config| = "Ubuntu64vb"
config.vm.boot_mode = :gui :bridged
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/
# 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
eslick / gist:6886353
Created Oct 8, 2013
Stacktrace from maven: mvn -e -s support/settings.xml install
View gist:6886353
[INFO] ------------------------------------------------------------------------
[INFO] Building Immutant App Bootstrap Module 1.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-java-version) @ immutant-bootstrap-module ---
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven-version) @ immutant-bootstrap-module ---
[INFO] --- buildnumber-maven-plugin:1.2:create-timestamp (get-build-timestamp) @ immutant-bootstrap-module ---
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 [] (DeploymentScanner-threads - 2) JBAS018559: Deployed "dummy.clj" (runtime-name : "dummy.clj")
15:48:29,055 INFO [] (HttpManagementService-threads - 3) JBAS014900: Content added at location /Users/eslick/.immutant/current/jboss/standalone/data/content/46/a044e91a04105e22e3cbb90a36cea84c7bcdac/content
15:48:29,062 INFO [] (MSC service thread 1-9) JBAS015876: Starting deployment of "switchboard.clj" (runtime-name: "switchboard.clj")
15:48:35,024 WARN [] (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 [] (MSC service thread 1-9) JBAS015960: Class Path entry apache-cassandra-thrift-1.2.6.jar in /Users/eslick/Work/vital/projects/sw
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"/>
<pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
<periodic-rotating-file-handler name="FILE" autoflush="true">
<level name="TRACE"/>
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"]
[com.datomic/datomic-pro "0.8.4143"] -> [org.slf4j/jul-to-slf4j "1.7.5"] -> [org.slf4j/slf4j-api "1.7.5"]
[com.datomic/datomic-pro "0.8.4143"] -> [org.slf4j/log4j-over-slf4j "1.7.5"] -> [org.slf4j/slf4j-api "1.7.5"]
[com.datomic/datomic-pro "0.8.4143"] -> [org.slf4j/jcl-over-slf4j "1.7.5"] -> [org.slf4j/slf4j-api "1.7.5"]