Skip to content

Instantly share code, notes, and snippets.

View BluLupo's full-sized avatar
📚
Always ready to learn

BluLupo

📚
Always ready to learn
View GitHub Profile
@BluLupo
BluLupo / telegram_send_message.py
Last active July 9, 2021 14:31
Send Message with Telegram Bot
import urllib.request
import requests
MAIN_URL = "https://api.telegram.org/"
TOKEN = "Your Bot Token"
CHAT_ID = -100123456789
def send_message(text, chat_id):
text = urllib.parse.quote_plus(text)
url = MAIN_URL + "bot{}/sendmessage?chat_id={}&text={}&parse_mode=HTML".format(TOKEN, chat_id, text)
@BluLupo
BluLupo / nginx.conf
Created April 20, 2020 15:11 — forked from nrollr/nginx.conf
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration