Skip to content

Instantly share code, notes, and snippets.

View alkalinecoffee's full-sized avatar

Joe Martin alkalinecoffee

  • Comcast
  • Philadelphia, PA
View GitHub Profile
{
"configs": [
{
"@type": "type.googleapis.com/envoy.admin.v3.BootstrapConfigDump",
"bootstrap": {
"node": {
"id": "hello-world-sidecar-proxy",
"cluster": "hello-world",
"metadata": {
"namespace": "default",
@alkalinecoffee
alkalinecoffee / gist:0da4b6f0fc5c88226597c42aaae1e8aa
Created April 20, 2020 12:17
create json from scratch with jq
echo "{}" | jq '{abc: 123}'
# returns:
# {
# "abc": 123
# }
#!/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 / dad-wifi-config.txt
Last active September 3, 2018 12:24
custom scripts
ACTIVE 2 192.168.1.233 3018483230
@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 / gist:1dab0cd845ad839d97281aa300a66f69
Last active November 17, 2017 21:09
test value for prometheus/alertmanager
# HELP testvalue A test value
# Type testvalue gauge
testvalue 5
@alkalinecoffee
alkalinecoffee / gist:9ff353d6ca33c736fbfd83b252d8cd47
Last active February 18, 2017 13:12
JBtek USB TTL pin connections for pine64
Pine64
EXP PINS
6 - Black (GND)
7 - White (RX)
8 - Green (TX)
Pi model B
2 - Red (Vcc) optional
6 - Black (GND)
8 - White (RX)
@alkalinecoffee
alkalinecoffee / haproxy.cfg
Created February 17, 2017 02:20
haproxy config for pihole and homeassistant on raspberry pi
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
Harbor Breeze
FAN LOW: 0111110001000
FAN MED: 0111110010000
FAN HGH: 0111110100000
FAN OFF: 0111110000010
LIGHT1: 0111110000001
LIGHT2: 0111110000000
@alkalinecoffee
alkalinecoffee / rf_test.ino
Created January 17, 2017 00:05
echo fireplace
// simple script to send RF code out to transmitter
// https://github.com/alkalinecoffee/echo_fireplace
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
const int ledPin = 16;
const int transmitPin = 12; // D6
const int pulseLength = 430;