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 | |
# | |
# Start the server in dev mode: | |
# | |
# bash setup-pki-vault-server.sh | |
# | |
# In another window, generate a cert: | |
# | |
# VAULT_ADDR=http://127.0.0.1:8200 VAULT_TOKEN=root vault write pki/issue/any common_name=foo | |
# |
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
type VaultDriver struct { | |
vaultClient *vaultapi.Client | |
project string | |
} | |
func (d VaultDriver) TokenRenewer(ctx context.Context) error { | |
renewer, err := d.vaultClient.NewRenewer(&vaultapi.RenewerInput{ | |
Secret: &vaultapi.Secret{ | |
Auth: &vaultapi.SecretAuth{ | |
ClientToken: d.vaultClient.Token(), |
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 | |
foo() { | |
op=$1 | |
# local op=$1 | |
echo "foo: op is $op" | |
} | |
main() { | |
op="main" |
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/sh | |
set -e | |
# Code generated by godownloader on 2020-05-22T18:17:38Z. DO NOT EDIT. | |
# | |
usage() { | |
this=$1 | |
cat <<EOF | |
$this: download go binaries for pantheon-systems/autotag |
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
#!/usr/bin/env python | |
# Usage: | |
# curl -sL https://gist.githubusercontent.com/joemiller/d89002a0d169cbb977e735df20e4ebd7/raw/poc.py | python | sort -rnk3 | head -n10 | |
# or with a different INTERVAL: | |
# curl -sL https://gist.githubusercontent.com/joemiller/d89002a0d169cbb977e735df20e4ebd7/raw/poc.py | INTERVAL=60 python | sort -rnk3 | head -n10 | |
import os | |
import time | |
def main(): |
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
sed -i -e 's/accounts_daemon = true/accounts_daemon = false/' /etc/default/instance_configs.cfg.template | |
/bin/google_instance_setup | |
systemctl restart google-accounts-daemon |
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
{ | |
"incident": { | |
"incident_id": "0.lj2va6zdkemq", | |
"resource_id": "", | |
"resource_name": "foobar appserver", | |
"resource": { | |
"type": "gce_instance", | |
"labels": { | |
"instance_id": "8979287136362607111", | |
"zone": "us-central1-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
package main | |
import ( | |
"context" | |
"errors" | |
"log" | |
"os" | |
"time" | |
"golang.org/x/oauth2/google" |
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
Homebrew build logs for gnupg on macOS 10.15.1 | |
Build date: 2019-12-03 17:43:27 |
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
#!/usr/bin/env ruby | |
# | |
# Usage: | |
# | |
# $ ruby pdns-recursor-cache-stats.rb | |
# | |
# Might need to use sudo or run as root to access the pdns_recursor control socket | |
# | |
uptime = 0 |