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
Using the saml2aws utility, you can get a set of temporary AWS credentials that you can export to your docker container. | |
Use this command to put those credentials into a local environment file for docker: | |
$ saml2aws exec env | egrep 'AWS_(ACC|SECR|SES)' > env.file | |
Running command as: arn:aws:sts::123456789012:assumed-role/AWS-MyRole/[email protected] | |
You should now see AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN inside of env.file | |
Now start your container with the --env-file option, using the env.file you just created. |
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
Using the saml2aws utility, you can get a set of temporary AWS credentials that you can export to your docker container. | |
Use this command to put those credentials into a local environment file for docker: | |
$ saml2aws exec env | egrep 'AWS_(ACC|SECR|SES)' > env.file | |
Running command as: arn:aws:sts::123456789012:assumed-role/AWS-MyRole/[email protected] | |
You should now see AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN inside of env.file | |
Now start your container with the --env-file option, using the env.file you just created. |
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
# $ cat docker-compose.yml | |
version: '2' | |
services: | |
unifi: | |
image: ryansch/unifi-rpi:latest | |
container_name: unifi | |
restart: always | |
network_mode: host | |
volumes: | |
# Unifi v5.0.7 creates all of these directories (some remain empty) |
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
version: "3" | |
# https://github.com/pi-hole/docker-pi-hole/blob/master/README.md | |
services: | |
pihole: | |
container_name: pihole | |
image: pihole/pihole:latest | |
# For DHCP it is recommended to remove these ports and instead add: network_mode: "host" | |
ports: |
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
Timestamp RF Strnght Quality Symbol Virtual Name | |
------------------------------------------------------------------------ | |
2019-12-16 00:04 41 100 100 100 41.1 CIII | |
2019-12-16 01:05 41 100 100 100 41.1 CIII | |
2019-12-16 02:05 41 100 100 100 41.1 CIII | |
2019-12-16 03:05 41 100 100 100 41.1 CIII | |
2019-12-16 04:05 41 100 100 100 41.1 CIII | |
2019-12-16 05:05 41 100 100 100 41.1 CIII | |
2019-12-16 06:05 41 100 100 100 41.1 CIII | |
2019-12-16 07:04 41 100 100 100 41.1 CIII |
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
#!/bin/bash | |
loblaws_10909() { | |
curl -m10 -s https://www.loblaws.ca/api/pickup-locations/1208/time-slots \ | |
-H 'Site-Banner: loblaw' | | |
jq -e -r '.timeSlots[] | select(.available!=false)' | |
} | |
loblaws_high_tech() { | |
curl -m10 -s https://www.loblaws.ca/api/pickup-locations/1028/time-slots \ |
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
#!/bin/sh | |
# add to cron to run every 20 minutes | |
# cru a ssh-clean "1,21,41 * * * * /jffs/cron/ssh-clean" | |
# remove cron | |
# cru d ssh-clean | |
netstat -p | grep ":ssh.*192.168.118.10:.*ESTABLISHED" | awk '{print $7}' | awk -F'/' '{print "kill", $1}' | sh |
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
#!/bin/bash | |
# Using some hints from https://community.home-assistant.io/t/convert-webhook-into-multiple-temp-sensors/573335/2 | |
# Get Receive and Transmit bytes for ppp0 interface | |
if read data_received data_sent < <(awk '/ppp0:/{print $2, $10}' /proc/net/dev); then | |
# Validate that data_received and data_sent are numbers | |
if [[ ! "$data_received" =~ ^[0-9]+$ ]] || [[ ! "$data_sent" =~ ^[0-9]+$ ]]; then | |
echo "Error: Received invalid data. Expected numeric values for data_received and data_sent." >&2 | |
exit 1 |
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
alias: UXG ppp0 stats | |
description: UXG ppp0 stats | |
trigger: | |
- platform: webhook | |
allowed_methods: | |
- POST | |
local_only: true | |
webhook_id: "uxg_ppp0_stats" | |
condition: [] | |
action: |
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
- trigger: | |
- platform: event | |
event_type: set_ppp0_data_received | |
sensor: | |
- name: UXG ppp0 Data Received | |
unique_id: uxg_ppp0_data_received | |
state: "{{ trigger.event.data.state }}" | |
- trigger: | |
- platform: event |