Skip to content

Instantly share code, notes, and snippets.

🤖
Hacking on Yetibot ‼️

Trevor Hartman devth

🤖
Hacking on Yetibot ‼️
Block or report user

Report or block devth

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View yetibot-fundamentals.md

Yetibot usage fundamentals

Instead of working through Yetibot's primitives and its many individual capabilities we'll start with a non trivial expression that's made up of several levels of nested aliases composed of piped commands. This will better illustrate how such primitives can be combined into something useful fun.

!yetishould
View es_query.sh
es_query() {
port="${port?$port must be set}"
pass="${pass?$pass must be set}"
query="${1?Query argument is required}"
curl -i -u "elastic:$pass" -XGET \
-H 'Content-Type: application/json' \
"https://localhost:$port/patient/_search?pretty" -d "
{
\"query\": {
\"match\": {
View onename
Verifying that "devth_.id" is my Blockstack ID. https://onename.com/devth_
View Makefile
compile: clean
# -m / --multi <dir> Write multiple files to the directory, list files on stdout
jsonnet $(JSONNET_ARGS) -m $(BUILD_DIR) $(TF_FILE)
show: compile
jsonnet $(JSONNET_ARGS) $(TF_FILE)
clean:
rm -f $(BUILD_DIR)/*.tf.json
rm -f $(BUILD_DIR)/*.tfplan
View wrap-problem.clj
"This validates that we have enough information and correct information in our clojure.specs and
extra-datomic-schema that conforms to how we are modeling our domain, including:
1. That there is a one-to-one correspondence between 'kind' clojure.specs in the spec registry and the 'kind'
information in `extra-datomic-schema`.
"
View grommet.js
This file has been truncated, but you can view the full file.
this["grommet"] =
webpackJsonp_name_([1],[
/* 0 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
View vault-statefulset.yaml
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: {{.Chart.Name}}
spec:
serviceName: {{.Chart.Name}}-headless
replicas: {{.Values.vault.replicas}}
template:
metadata:
@devth
devth / spec.cljs
Last active Feb 21, 2017 — forked from swannodette/spec.cljs
om.next query spec
View spec.cljs
(ns om.next.spec
(:require [cljs.spec :as s]))
(s/def ::ident (s/and vector? (s/cat :ident keyword? :value #(not (coll? %)))))
(s/def ::join-key (s/or :prop keyword? :ident ::ident))
(s/def ::join (s/map-of ::join-key ::query))
(s/def ::union (s/map-of keyword? (s/map-of keyword? ::query)))
(s/def ::param-expr
View rolling-drain.sh
#!/usr/bin/env bash
if [[ "$1" == '-h' ]] || [[ $# != 1 ]]; then
echo "Usage: $(basename "$0") <nodepool>"
echo
echo "<nodepool> can be a partial match to grep for, e.g. '2016-08-19'"
echo
echo "NOTE: Before draining all nodes in the old pool should be cordoned!"
exit 1;
fi
View kube-dns-logs.sh
kubectl --namespace kube-system get pod -l k8s-app=kube-dns -oname | \
xargs -I% -n1 sh -c 'echo %; kubectl --namespace kube-system -ckubedns logs %; echo'
You can’t perform that action at this time.