Skip to content

Instantly share code, notes, and snippets.

View patrickwmcgee's full-sized avatar

Patrick McGee patrickwmcgee

View GitHub Profile
@patrickwmcgee
patrickwmcgee / Jenkinsfile
Created June 27, 2017 19:51
Jenkins Pipeline Example: jenkins-pipeline + Go + glide.sh + multibranch pipeline
#!groovy
/**
* This is an example Jenkins pipeline Jenkinsfile for building and testing a private Github Go project that uses glide.sh.
* This style of Pipeline works with the Jenkins Git plugin and multibranch pipeline projects. In a multi-branch project configuring
* a webhook for push and pull request is needed from the Github repository to get builds to automatically start after a push.
*/
pipeline {
agent {
label 'your-agent-goes-here'
}

Keybase proof

I hereby claim:

  • I am patrickwmcgee on github.
  • I am pmcgee (https://keybase.io/pmcgee) on keybase.
  • I have a public key whose fingerprint is A3F3 15A3 5294 EE6F 7E15 2340 94CF 9696 DB44 28F1

To claim this, I am signing this object:

#!/bin/bash
ELM_PATH="/elm"
tmux start-server
tmux new-session -d -s elm
tmux split-window -v -t elm:1
tmux select-pane -t 0
@patrickwmcgee
patrickwmcgee / cascalog-with-workflow.clj
Last active August 29, 2015 14:25
Cascalog Workflow example
(defn -main
[arg]
(workflow ["/tmp/workflow"]
read-data ([:tmp-dirs [data-path]]
(import-data path1 path2))
work-step ([:deps :all]
(let [data (hfs-seqfile data-path)]
(?- (hfs-textline output-path-1 :sinkmode :replace) (query1 data)
(hfs-textline output-path-2 :sinkmode :replace) (query2 data))))))
@patrickwmcgee
patrickwmcgee / parsercombinator.py
Created August 12, 2013 21:49
Parser Combinator in Python
import pdb
import sys
import re
class Combinators:
def __init__ (self,input):
self.input = input
self.counter = 0
# Consume a character (this assumes we don't have a scanner/lexer)
def eat(self,c):
def word_wrap(txt, col = 80)
txt.gsub(/(.{1,#{col + 4}})(\s+|\Z)/, "\\1\n")
end