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
Enter the following to create Prometheus user accounts to be used as a service user accounts for security and | |
administration purposes. These accounts will not be used for logging into the system. | |
Use the following commands in Terminal to create the service user accounts. | |
$ sudo useradd --no-create-home --shell /bin/false prome | |
$ sudo useradd --no-create-home --shell /bin/false node_exporter | |
Create Prometheus Directories | |
$ sudo mkdir /etc/prometheus |
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
import gdata.youtube | |
import gdata.youtube.service | |
# Dependencies: | |
# - Python==3.10 | |
# - gdata-python3==2.0.18 | |
# - google-api-python-client==1.2 | |
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
<html> | |
<head> | |
<title>Google Gauge - ThingSpeak Example</title> | |
<style type="text/css"> | |
body { background-color: #ddd; } | |
#container { height: 100%; width: 100%; display: table; } | |
#inner { vertical-align: middle; display: table-cell; } | |
#gauge_div { width: 120px; margin: 0 auto; } | |
</style> |
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 | |
# in case the mysql db is located in docker container. | |
append_cli=$4 | |
# For taking backup | |
backup_dir=/media/storage/backup/db_backup/ | |
datestamp=$(date +%d-%m-%y-%H-%M) | |
db_user=backup | |
db_port=$2 | |
db_pass=$3 |
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
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
chroot /var/lib/haproxy | |
stats socket /run/haproxy/admin.sock mode 660 level admin | |
stats timeout 30s | |
user haproxy | |
group haproxy | |
daemon |
This file has been truncated, but you can view the full file.
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
{"reqId":"yY249L9bBmlx6xeJ6rmV","level":3,"time":"2020-11-22T22:53:47+00:00","remoteAddr":"10.8.0.4","user":"skumar","app":"PHP","method":"GET","url":"/nextcloud/index.php/apps/dashboard/","message":{"Exception":"Error","Message":"file_put_contents(/media/storage/data/appdata_ocr2fw9pzn5a/css/icons/icons-vars.css): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/Files/Storage/Local.php#277","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"file_put_contents(/media/storage/data/appdata_ocr2fw9pzn5a/css/icons/icons-vars.css): failed to open stream: No such file or directory","/var/www/html/nextcloud/lib/private/Files/Storage/Local.php",277,{"path":"appdata_ocr2fw9pzn5a/css/icons/icons-vars.css","data":":root {\n--icon-confirm-fade-000: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdib3g9IjAgMCAxNiAxNiIgd2lkdGg9IjE2IiB2ZXJzaW9uPSIxLjEiIGhlaWdodD0iMTYiPjxwYXRoIG9wYWNpdHk9Ii41IiBkPSJtOC41I |
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 docker create \ | |
-v /:/rootfs:ro \ | |
-v /var/run:/var/run:rw \ | |
-v /sys:/sys:ro \ | |
-v /var/lib/docker/:/var/lib/docker:ro \ | |
-p 49876:8080 \ | |
--name=cadvisor \ | |
google/cadvisor:latest | |
sudo echo "[Unit] |
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
# Vncserver service file for Debian or Ubuntu with systemd | |
# | |
# Install vncserver and tools | |
# e.g. apt-get install tightvncserver autocutsel gksu | |
# | |
# 1. Copy this file to /etc/systemd/system/vncserver@:1.service | |
# 2. Edit User= | |
# e.g "User=paul" | |
# 3. Edit the vncserver parameters appropriately in the ExecStart= line! | |
# e.g. the -localhost option only allows connections from localhost (or via ssh tunnels) |
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
int GLED = 13; // Wet Indicator at Digital PIN D13 | |
int RLED = 12; // Dry Indicator at Digital PIN D12 | |
int SENSE = 0; // Soil Sensor input at Analog PIN A0 | |
int value = 0; | |
#include<dht.h> | |
dht DHT; | |
#define DHT11_PIN 8 // Second pin, leave 3rd pin unconnected 4th is ground |
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
String* getWifiHotspots() { | |
// String* arr = new String[]; | |
String arr[100]; | |
Serial.print("Scan start ... "); | |
int n = WiFi.scanNetworks(); | |
for (int i = 0; i < n; i++) | |
{ | |
arr[i] = WiFi.SSID(i).c_str(); | |
} | |
return arr; |
NewerOlder