Skip to content

Instantly share code, notes, and snippets.

View p-b-west's full-sized avatar

Peter West p-b-west

View GitHub Profile

Keybase proof

I hereby claim:

  • I am p-b-west on github.
  • I am cassowary (https://keybase.io/cassowary) on keybase.
  • I have a public key ASC3N9NSRaJgblsYFt6NdRG-XoJYv_Yg-CJStFdhAwDlsgo

To claim this, I am signing this object:

@p-b-west
p-b-west / proj-deps
Last active September 5, 2016 02:44
Generate bash env-var assignments from clojurescript project.clj :dependencies
#! /bin/bash
function upcase() {
echo "$1" | tr 'a-z' 'A-Z'
}
DEPS=$(sed -e '
/^[ \i]*:dependencies *\[/!d
/^[ \i]*:dependencies *\[/ {
s///
@p-b-west
p-b-west / gist:f8601618c51c8e22ba4e
Last active December 5, 2015 11:48
ruby inject examples
# This example from RubyMonk Ruby Primer:Ascent 7.1 in the discussion on 'inject'.
def occurrences(str)
str.scan(/\w+/).inject(Hash.new(0)) do |build, word|
# Changing Hash.new(0) to {} breaks this
build[word.downcase] +=1
build
end
end
clean-package:
Deleting directory /Users/pbw/Software/DocumentProcessing/DITA/ot_b_mt1-6/target
init-package:
Created dir: /Users/pbw/Software/DocumentProcessing/DITA/ot_b_mt1-6/target
clean-java:
init-java:
Created dir: /Users/pbw/Software/DocumentProcessing/DITA/ot_b_mt1-6/target/classes
compile:
Compiling 135 source files to /Users/pbw/Software/DocumentProcessing/DITA/ot_b_mt1-6/target/classes
Note: Some input files use or override a deprecated API.
clean-package:
Deleting directory /Users/pbw/Software/DocumentProcessing/DITA/ot_b_mt1-6/target
init-package:
Created dir: /Users/pbw/Software/DocumentProcessing/DITA/ot_b_mt1-6/target
clean-java:
init-java:
Created dir: /Users/pbw/Software/DocumentProcessing/DITA/ot_b_mt1-6/target/classes
compile:
Compiling 135 source files to /Users/pbw/Software/DocumentProcessing/DITA/ot_b_mt1-6/target/classes
Note: Some input files use or override a deprecated API.