Skip to content

Instantly share code, notes, and snippets.

@rgatti
rgatti / vela-completion.bash
Created May 22, 2020 15:28
vela bash completion (wip)
#!/usr/bin/env bash
# Get org names from previously added repos
__get_org_names() {
vela get repo --output yaml | awk '/ org:/{ print $2 }' | sort -u
}
# Get repo names from previously added repos
__get_repo_names() {
vela get repo --output yaml | awk '/ name:/{ print $2 }' | sort -u
@rgatti
rgatti / Combinator.groovy
Created May 28, 2020 14:19
Groovy Combinator example
// Abstract parser type
abstract class Parser<T> {
/* Parser implementation ...
*
* A parser only has to implement the base case, ie. how to parse a single
* element.
*/
abstract ParserResult<T> parse(String string)