How to send a Telegram alert message using Go

Here’s a simple example of how to send a message from Go via Telegram: package main import ( “bytes” “fmt” “net/http” “encoding/json” ) func send(text string, bot string, chat_id string) { request_url := “https://api.telegram.org/” + bot + “/sendMessage” client := &http.Client{} values := map[string]string{“text”: text, “chat_id”: chat_id } json_paramaters, _ := json.Marshal(values) req, _:= http.NewRequest(“POST”,…

How to setup free willdcard SSL certificate from LetsEncrypt

We’ll use Centos 7. Run: yum install epel-release && yum install install certbot Or if you already have certbot installed yum update certbot Once done fire (change example.com to your domain): certbot certonly –manual -d *.example.com,example.com –preferred-challenges dns-01 –server https://acme-v02.api.letsencrypt.org/directory A certificate created for *.example.com is not valid for example.com, so you have to add it…