Skip to content

Instantly share code, notes, and snippets.

@sthaha
sthaha / T.sh
Created February 28, 2019 14:14
Remind me after sometime or at a time
#! /usr/bin/env bash
# usage: remme
# adapted from: http://usalug.org/phpBB2/viewtopic.php?t=13209&sid=a641eb81eff1925e714a2fc6576e8a13
set -eu
sleep_and_notify() {
local when=$1; shift
local title="$1"; shift
local body="$1"; shift
@sthaha
sthaha / release.yaml
Created February 28, 2019 12:22
knative-pipeline release.yaml
---
apiVersion: v1
kind: Namespace
metadata:
name: tekton-pipelines
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: tekton-pipelines-admin
import subprocess
from elasticsearch import Elasticsearch, Transport
def execute(command):
return subprocess.run(
['/bin/sh', '-c', f"{command}"],
stdout=subprocess.PIPE)
@sthaha
sthaha / reup
Created August 22, 2018 12:14 — forked from chmouel/reup
#!/bin/bash
PATH=$PATH:/usr/local/bin
set -ex
DOMAIN=openshift3.chmouel.com
VERSION=3.10.0
OC_VERSION=oc-v${VERSION}
INSTALLPATH=/etc/origin
#!/bin/bash
set -e
# Your user name on OSIO
USER=${T-"SET YOUR USERNAME"}
# Get this from your Jenkins setting
API_TOKEN=${JENKINS_API_TOKEN:-"SET THIS"}
# You need to be login with oc or set this manually (but that may change on recration)
#! /usr/bin/env bash
# usage: remme
# adapted from: http://usalug.org/phpBB2/viewtopic.php?t=13209&sid=a641eb81eff1925e714a2fc6576e8a13
set -eu
sleep_and_notify() {
local when=$1; shift
local title="$1"; shift
local body="$1"; shift
#!/bin/bash
set -e -u -o pipefail
#Usage: source <(gopath)
is_go_dir() {
[[ -d src ]] && [[ -d pkg ]] && [[ -d bin ]]
}
find_go_path() {