Skip to content

Instantly share code, notes, and snippets.

View jamtur01's full-sized avatar
💭
I may be slow to respond.

James Turnbull jamtur01

💭
I may be slow to respond.
View GitHub Profile
@jamtur01
jamtur01 / sparklines.clj
Created September 13, 2015 17:43
Sparklines generator modified from Jonathan A Watmough
; Sparkline Generator
; Copyright (c) Jonathan A Watmough. All Rights Reserved.
;
; The use and distribution terms for this software are covered by the
; Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.txt).
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license. Do not remove this notice.
(import 'java.io.File)
1: https://repo1.maven.org/maven2/ -> am.ik.archetype:maven-reactjs-blank-archetype (Blank Project for React.js)
2: https://repo1.maven.org/maven2/ -> am.ik.archetype:msgpack-rpc-jersey-blank-archetype (Blank Project for Spring Boot + Jersey)
3: https://repo1.maven.org/maven2/ -> am.ik.archetype:mvc-1.0-blank-archetype (MVC 1.0 Blank Project)
4: https://repo1.maven.org/maven2/ -> am.ik.archetype:spring-boot-blank-archetype (Blank Project for Spring Boot)
5: https://repo1.maven.org/maven2/ -> am.ik.archetype:spring-boot-docker-blank-archetype (Docker Blank Project for Spring Boot)
6: https://repo1.maven.org/maven2/ -> am.ik.archetype:spring-boot-gae-blank-archetype (GAE Blank Project for Spring Boot)
7: https://repo1.maven.org/maven2/ -> am.ik.archetype:spring-boot-jersey-blank-archetype (Blank Project for Spring Boot + Jersey)
8: https://repo1.maven.org/maven2/ -> at.chrl.archetypes:chrl-spring-sample (Archetype for Spring Vaadin Webapps)
9: https://repo1.maven.org/maven2/ -> br.com.address.archetypes:struts2
@jamtur01
jamtur01 / ladder.md
Last active August 20, 2025 19:17
Kickstarter Engineering Ladder
(def hc (hipchat {:server "..."
:room 12345
:token "..."
:notify 0}))
(streams
(where (...)
hc))
(def pusher (pushover "asdaasd" "asdasdas"))
(streams
(where (service "somecriticalservice")
(changed-state { :init "ok" }
pusher)))
defn foo [] ....)
@jamtur01
jamtur01 / minipages.hs
Created March 23, 2016 15:51
Minipages filter for Pandoc
import Text.Pandoc
import Text.Pandoc.JSON
main = toJSONFilter addMinipages'
addMinipages' :: Pandoc -> Pandoc
addMinipages' = bottomUp addMinipages
addMinipages :: [Block] -> [Block]
addMinipages (CodeBlock attr code : xs)
@jamtur01
jamtur01 / check_ratio.clj
Created April 12, 2016 13:10
Check Ratio stream
(defn check_ratio [srv1 srv2 newsrv warning critical & children]
(project [(service srv1)
(service srv2)]
(smap folds/quotient
(fn [event] (let [percenta (* (float (:metric event)) 100)
new-event (assoc event :metric percenta
:service (str newsrv)
:type_instance nil
:state (condp < percenta
critical "critical"
  1. Do a commit bumping the version from x.y.z-SNAPSHOT to x.y.z
  2. lein deploy clojars or mvn deploy
  3. git tag x.y.z
  4. git push --tags
  5. Another commit for x.y.whatever-SNAPSHOT.
2016/09/30 14:45:10 [INFO] Terraform version: 0.7.4 84592f5967490d118aae0b61a25d589d269fd0b6
2016/09/30 14:45:10 [INFO] CLI args: []string{"/usr/local/bin/terraform", "plan"}
2016/09/30 14:45:10 [DEBUG] Detected home directory from env var: /Users/james
2016/09/30 14:45:10 [DEBUG] Detected home directory from env var: /Users/james
2016/09/30 14:45:10 [DEBUG] Attempting to open CLI config file: /Users/james/.terraformrc
2016/09/30 14:45:10 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2016/09/30 14:45:10 [DEBUG] Detected home directory from env var: /Users/james
2016/09/30 14:45:10 [DEBUG] DestroyEdgeInclude: Checking: aws_instance.base
2016/09/30 14:45:10 [DEBUG] DestroyEdgeInclude: Checking: aws_instance.base
2016/09/30 14:45:10 [TRACE] Graph after step *terraform.DestroyTransformer: