I hereby claim:
- I am tmxak on github.
- I am maxtacu (https://keybase.io/maxtacu) on keybase.
- I have a public key ASDdxH0QwYgyH6g-d4QhZdneR1qF_1nQC5cODUosWHFI-Qo
To claim this, I am signing this object:
| import time | |
| import argparse | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument('-t', '--time', type=int, required=True, help="Time in seconds") | |
| parser.add_argument('-o', '--output',default="counter.txt", help="Output file") | |
| args = parser.parse_args() | |
| def countdown(t): | |
| while t: |
I hereby claim:
To claim this, I am signing this object:
| import telebot, os | |
| from flask import Flask, request | |
| __location__ = os.path.realpath( | |
| os.path.join(os.getcwd(), os.path.dirname(__file__))) | |
| keyfile = open(os.path.join(__location__, 'apiKey.txt'), "r") | |
| token = keyfile.read().replace('\n', '') | |
| secret = 'SECRET-URL-PATH' # for example: 2412qweh15sf14s234jeqwe | |
| url = 'YOUR-URL/' + secret |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "os/exec" | |
| ) | |
| type EKSClusters struct { |
| #!/bin/bash | |
| # Your hubitat IP | |
| HUBITAT=1.2.3.4 | |
| # Backup output path parameter. Default: "." current path where you execute the script. | |
| BACKUP_PATH="${1:-.}" | |
| # Get the name of the latest backup file | |
| REMOTE_BACKUP=`curl -s "http://$HUBITAT:8081/api/backups" | jq -r '.backups[0].name'` | |
| # Download backup | |
| curl -s "http://$HUBITAT:8081/api/downloadBackup/$REMOTE_BACKUP" -o $BACKUP_PATH/backup.lzf |
Here, in one place, are some valuable queries for extracting insights and troubleshooting potential problems that I have gathered myself during my SRE experience, or found and used from the web:
SELECT
date(parse_datetime(time, 'yyyy-MM-dd''T''HH:mm:ss.SSSSSSZ')) AS day,
COUNT(*) AS total_requests
FROM alb_logs
GROUP BY date(parse_datetime(time, 'yyyy-MM-dd''T''HH:mm:ss.SSSSSSZ'))
ORDER BY day DESC;