Skip to content

Instantly share code, notes, and snippets.

View alkalinecoffee's full-sized avatar

Joe Martin alkalinecoffee

  • Comcast
  • Philadelphia, PA
View GitHub Profile
@alkalinecoffee
alkalinecoffee / consul-cp.sh
Last active April 2, 2018 18:15
Bash script to recursively copy consul KVs from one directory to another
#/bin/bash
# Recursively copies keys from KEYS_TO_COPY and places them under TO_DIR directory, ie
# /alertmanager => /services/alertmanager
CONSUL_HOST=http://consul.example.com:443
KEYS_TO_COPY=$(cat <<-END
alertmanager
consul
@alkalinecoffee
alkalinecoffee / dad-wifi-config.txt
Last active September 3, 2018 12:24
custom scripts
ACTIVE 2 192.168.1.233 3018483230
#!/bin/sh
# wget -qO- http://mywebsite.com/myscript.txt | bash -s phone-number username64 password64
to=$1
username64=$2
password64=$3
attempts=2
ip=192.168.1.234
@alkalinecoffee
alkalinecoffee / gist:0da4b6f0fc5c88226597c42aaae1e8aa
Created April 20, 2020 12:17
create json from scratch with jq
echo "{}" | jq '{abc: 123}'
# returns:
# {
# "abc": 123
# }
{
"configs": [
{
"@type": "type.googleapis.com/envoy.admin.v3.BootstrapConfigDump",
"bootstrap": {
"node": {
"id": "hello-world-sidecar-proxy",
"cluster": "hello-world",
"metadata": {
"namespace": "default",