# All topics in will be forward to your local instance. If the topic contains *remote_cloudmqtt*, it will be trigger to the cloud.
connection cloudmqtt
address <HOSTNAME>:18967
remote_username <USERNAME>
remote_password <PASSWORD>
clientid repeater-cloudmqtt
# cp <CONTENT> /etc/profile.d/motd.sh | |
# echo "" > /etc/motd | |
let upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)" | |
let secs=$((${upSeconds}%60)) | |
let mins=$((${upSeconds}/60%60)) | |
let hours=$((${upSeconds}/3600%24)) | |
let days=$((${upSeconds}/86400)) | |
UPTIME=`printf "%d days, %02dh%02dm%02ds" "$days" "$hours" "$mins" "$secs"` |
Within GitHub it is possible to set up two types of SSH key - account level SSH keys and and repository level SSH keys. These repository level SSH keys are known in GitHub as deploy keys.
Deploy keys are useful for deploying code because they do not rely on an individual user account, which is susceptible to change, to “store” the server keys.
There is, however, an ‘issue’ with using deploy keys; each key across all repositories on GitHub must be unique. No one key can be used more than once. This becomes a problem when deploying to repositories to the same server with the same user. If you create two keys, the SSH client will not know which key to use when connecting to GitHub.
One solution is to use an SSH config file to define which key to use in which situation. This isn’t as easy as it seems.. you might try something like this:
version: '3.7' | |
services: | |
thelounge: | |
image: thelounge/thelounge:latest | |
container_name: thelounge | |
expose: | |
- "9000" | |
restart: always | |
volumes: | |
- ~/.thelounge:/var/opt/thelounge # |
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -e DRY_RUN=1 spotify/docker-gc |
DOCKER_REGISTRY=eu.gcr.io | |
DOCKER_IMAGE_NAME=<IMAGE_NAME> | |
echo "Docker login..." | |
docker login -u _json_key -p "$(cat credentials.json)" https://gcr.io | |
docker build -t $DOCKER_IMAGE_NAME . | |
DOCKER_TAG_NAME=$(docker images | grep $DOCKER_IMAGE_NAME | grep latest | awk '{print $3}') | |
docker tag $DOCKER_TAG_NAME $DOCKER_REGISTRY/<SERVICE>/$DOCKER_IMAGE_NAME | |
docker push $DOCKER_REGISTRY/<SERVICE>/$DOCKER_IMAGE_NAME |
docker run -d \ | |
--restart=always \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
containrrr/watchtower \ | |
--cleanup \ | |
homeassistant unifi-controller thelounge miflora-mqtt-daemon node-red |
curl --cookie-jar cookies.txt 'https://account.withings.com/connectionwou/account_login' --data 'email=<USERNAME>&password=<PASSWORD>' --compressed
curl -b cookies.txt 'https://scalews.withings.com/cgi-bin/v2/measure' --data-binary 'action=getmeashf&meastype=35%2C12&deviceid=<DEVICE_ID>' --compressed
Here are several different ways to test a TCP port without telnet.
BASH (man page)
$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C
$ cat < /dev/tcp/127.0.0.1/23