This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias lg="git log --color --pretty=format:'%C(auto)%h %Cred %<(10,trunc)%an %Creset%C(auto)%s %Cgreen(%cr,%ar) %Creset%C(auto)%d'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# function to wrap a command with logging that also returns | |
# the status code of the command | |
function run() { | |
echo "running $@" |& tee -a out.log | |
eval $@ > >(tee -a out.log) 2> >(tee -a out.log) | |
return $? | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//counts instances of words that start with EDRIVE. stripping ; or ) off the end | |
grep -re 'EDRIVE\.' * |sed -e 's/.* \(EDRIVE\.[^ \);]*\).*/\1/' |sort |uniq -c | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;input [:app :env config-{}] | |
(defn download-archive | |
[app env | |
{:keys [build-number build-name workdir] | |
{:keys [base-url archive-api archive-type archive-input-regex user pass]} :artifactory | |
{{{:keys [regex]} app} env} :deploy}] | |
(write-stream {:in (io/input-stream | |
(get-archive-response-body | |
{:uname user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; requires >= jdk 1.8 | |
(defn decode-base64 [to-decode] | |
(String. (.decode (java.util.Base64/getDecoder) to-decode))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; requires >= jdk 1.8 | |
(defn encode-base64 [to-encode] | |
(.encodeToString (java.util.Base64/getEncoder) (.getBytes to-encode))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns untar | |
(:import (org.apache.commons.compress.archivers.tar TarArchiveInputStream) | |
(java.io File) | |
(java.io FileOutputStream) | |
(java.io FileInputStream))) | |
(defn untar-file | |
"untar file and save to location - preserving filenames" | |
[zipfile outdirpath] | |
(let [buffer (byte-array 1024) |
NewerOlder