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 | |
# Set variables | |
export PATH="$${PATH}:/usr/local/bin" | |
export local_ip="$(curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip)" | |
consul_version="1.7.2" | |
consul_url="https://releases.hashicorp.com/consul/${consul_version}/consul_${consul_version}_linux_amd64.zip" | |
curl "${consul_url}" -o consul.zip |
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
### Configure variables | |
These variables will be used for this snippet. Please substitute accordingly. | |
```bash | |
export RootCAName="root_ca" | |
export InterCAName="inter_ca" | |
export CommonName="hashidemos.io" | |
export InterCommonName="inter.hashidemos.io" | |
export Root_CA_ttl="730h" | |
export Inter_CA_ttl="350h" | |
export Cert_ttl="8h" |
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
Date | Day | Battery level | Weather | |
---|---|---|---|---|
Feb 14 | 1 | 77% | Sunny |
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 | |
# The command to run. Use operation=$1 to pass it in as a parameter. | |
OPERATION='kasa --type plug --alias "basement-fan" on' | |
# Threshold for maximum humidity | |
th=65 | |
# Threshold for minimum temperature | |
tt=60 |
OlderNewer