🏳️🌈
This file contains 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
## Prompt | |
# Colors used for the prompt | |
# Regular text color | |
BLACK='\[\e[0;30m\]' | |
# Bold text color | |
BBLACK='\[\e[1;30m\]' | |
# Background color | |
BGBLACK='\[\e[40m\]' | |
RED='\[\e[0;31m\]' | |
BRED='\[\e[1;31m\]' |
This file contains 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
# Two separate automation configs, one for on and one for off. | |
# Indicator On | |
alias: Automation - Garage Door Open Indicator On | |
description: '' | |
trigger: | |
- platform: device | |
device_id: 860cdcae1ac3a1f0b3d9aa2e4d409eea | |
domain: cover | |
entity_id: cover.garage_door |
This file contains 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
## First Terminal | |
[cmcintosh@Apogee ~/.../github.com/openconfig/gnmi-gateway:release] :) make run | |
rm -f gnmi-gateway | |
rm -f cover.out | |
go build -o gnmi-gateway -ldflags "-X github.com/openconfig/gnmi-gateway/gateway.Version="v0.8.0-8-gcc25dbc-cc25dbc" -X github.com/openconfig/gnmi-gateway/gateway.Buildtime=2020-11-22T01:14:39Z" . | |
./gnmi-gateway -version | |
gnmi-gateway version v0.8.0-8-gcc25dbc-cc25dbc (Built 2020-11-22T01:14:39Z) | |
./gnmi-gateway -EnableGNMIServer -ServerTLSCert=server.crt -ServerTLSKey=server.key -TargetLoaders=json -TargetJSONFile=targets.json | |
{"level":"info","time":"2020-11-21T17:14:45-08:00","message":"Starting GNMI Gateway."} | |
{"level":"info","time":"2020-11-21T17:14:45-08:00","message":"Clustering is NOT enabled. No locking or cluster coordination will happen."} |
This file contains 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
sudo apt update | |
sudo apt upgrade -y | |
sudo apt install nginx | |
sudo mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak | |
# Create a folder to store your certs | |
mkdir -p /etc/nginx/ssl | |
# Edit NGINX config for your site | |
# If you need a TLS secured NGINX config look at https://gist.github.com/colinmcintosh/25425fccbde0a5bdc9df1153bd94b665 |
This file contains 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
# Pre-reqs | |
sudo apt update | |
sudo apt upgrade -y | |
sudo apt install software-properties-common certbot python-certbot-nginx python-pip | |
sudo pip install -U pip | |
sudo pip install setuptools wheel | |
sudo pip install certbot-dns-cloudflare | |
# Setup your Cloudflare API credentials | |
sudo mkdir ~/.secrets |
This file contains 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
// Copyright 2020 Netflix Inc | |
// Author: Colin McIntosh (colin@netflix.com) | |
// Copyright 2015 Google Inc. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 |
This file contains 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
sudo apt update | |
sudo apt install ax25-tools ax25-apps | |
sudo vim /etc/ax25/axports | |
# Add the following line (replace MYCALL with your callsign): | |
# thd72a MYCALL 9600 255 7 TH-D72A (MYCALL) | |
# Install the latest release of Pat from here: https://github.com/la5nta/pat/releases. E.g. | |
wget https://github.com/la5nta/pat/releases/download/v0.6.1/pat_0.6.1_linux_amd64.deb | |
sudo dpkg -i pat_0.6.1_linux_amd64.deb | |
sudo /usr/share/pat/ax25/install-systemd-ax25-unit.bash |
This file contains 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
pkg install nginx | |
pkg update | |
pkg install vim py27-certbot py27-certbot-dns-cloudflare | |
mkdir ~/.secrets | |
vim ~/.secrets/cloudflare.ini | |
##### BEGIN INI FILE | |
# Cloudflare API credentials used by Certbot | |
dns_cloudflare_email = cloudflare-email@youremail.com |
This file contains 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
adduser colin | |
usermod -aG sudo colin | |
sudo visudo | |
# %sudo ALL=(ALL:ALL) NOPASSWD: ALL | |
mkdir /home/colin/.ssh | |
cp ~/.ssh/authorized_keys /home/colin/.ssh/ | |
chown -R colin:colin /home/colin/.ssh | |
exit |
This file contains 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
worker_processes auto; | |
worker_rlimit_nofile 65535; | |
events { | |
multi_accept on; | |
worker_connections 65535; | |
} | |
http { | |
charset utf-8; |
NewerOlder