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…

Ansible: quick intro

Ansible is a solution for remote server management. It’s pure Python and basically the only thing  it requires is SSH connection. Why you might want to start using it? Well.. For starters, it’s very simple. It’s possible to start using it after 10 minutes introduction. It doesn’t require to know anything special. All configuration is plain…