Skip to content

Instantly share code, notes, and snippets.

View authentication.py
import aiohttp
import asyncio
import logging
import time
from pyppeteer import launch
from urllib.parse import urlparse, parse_qs
from bs4 import BeautifulSoup
View check_authorization.php
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
@MrTheFirst
MrTheFirst / README.md
Created November 2, 2021 12:10 — forked from unnikked/README.md
How to host your Telegram bot on Google App Script
View README.md

Telegram Bot on Google App Script

This is the source code of one of my blog post. To read the full blog post please click here.

View Certbot и nginx, как обратный прокси в Docker.md

Более удобной и актуальной версией является эта статья с использованием traefik

https://gist.github.com/dancheskus/365e9bc49a73908302af19882a86ce52


Certbot и nginx, как обратный прокси в Docker (пример с 2 react проектами)

В результате будет 2 react проекта на 1 сервере доступных по разным ссылкам

@MrTheFirst
MrTheFirst / pug.md
Created November 14, 2019 12:25 — forked from neretin-trike/pug.md
Туториал по HTML препроцессору Pug (Jade)
View pug.md
@MrTheFirst
MrTheFirst / compile.js
Created September 4, 2019 08:51 — forked from manuhabitela/compile.js
Checking environment in (node) Sass
View compile.js
#!/usr/bin/env node
var fs = require('fs');
var path = require('path');
var sass = require('node-sass');
var ENV = process.env.SASS_ENV || 'development';
var file = 'variables.scss';
//if in dev, directly pass file to sass
if (ENV === "development") {
@MrTheFirst
MrTheFirst / centos7_timechine.sh
Created October 2, 2017 14:31 — forked from darcyliu/centos7_timechine.sh
Install Time Machine service on CentOS 7
View centos7_timechine.sh
# Install Time Machine service on CentOS 7
# http://netatalk.sourceforge.net/wiki/index.php/Netatalk_3.1.7_SRPM_for_Fedora_and_CentOS
# http://confoundedtech.blogspot.com/2011/07/draft-draft-ubuntu-as-apple-time.html
yum install -y rpm-build gcc make wget
# install netatalk
yum install -y avahi-devel cracklib-devel dbus-devel dbus-glib-devel libacl-devel libattr-devel libdb-devel libevent-devel libgcrypt-devel krb5-devel mysql-devel openldap-devel openssl-devel pam-devel quota-devel systemtap-sdt-devel tcp_wrappers-devel libtdb-devel tracker-devel
yum install -y bison docbook-style-xsl flex dconf
@MrTheFirst
MrTheFirst / 0_reuse_code.js
Created May 6, 2016 21:50
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console