Skip to content

Instantly share code, notes, and snippets.

View git-webmaster's full-sized avatar
😉
Hi, Googlz!

Anton git-webmaster

😉
Hi, Googlz!
View GitHub Profile
@nalgeon
nalgeon / timezones.csv
Last active May 23, 2021 20:54
Часовые пояса в Дадате
Название Код MSK Код UTC Описание Описание и сдвиг по MSK
USZ1 MSK-1 UTC+2 Калининградское время Калининградское время (MSK-1)
MSK MSK+0 UTC+3 Московское время Московское время (MSK)
SAMT MSK+1 UTC+4 Самарское время Самарское время (MSK+1)
YEKT MSK+2 UTC+5 Екатеринбургское время Екатеринбургское время (MSK+2)
OMST MSK+3 UTC+6 Омское время Омское время (MSK+3)
KRAT MSK+4 UTC+7 Красноярское время Красноярское время (MSK+4)
IRKT MSK+5 UTC+8 Иркутское время Иркутское время (MSK+5)
YAKT MSK+6 UTC+9 Якутское время Якутское время (MSK+6)
VLAT MSK+7 UTC+10 Владивостокское время Владивостокское время (MSK+7)
@nalgeon
nalgeon / cities.md
Last active July 9, 2025 13:38
Города России с координатами
@crittermike
crittermike / wget.sh
Last active August 21, 2025 03:22
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
@nalgeon
nalgeon / socrbase.md
Last active March 19, 2022 11:36
Типы адресных объектов в ФИАС
@julienbourdeau
julienbourdeau / wilson.php
Last active August 13, 2024 12:55
[PHP] 5 Star Rating - Lower bound of Wilson score confidence interval for a Bernoulli parameter
<?php
/*
|--------------------------------------------------------------------------
| 5 Star Rating
|--------------------------------------------------------------------------
|
| Lower bound of Wilson score confidence interval for a Bernoulli parameter (0.9604)
|
| See:
@paragonie-scott
paragonie-scott / JWTKiller.php
Created March 14, 2017 21:37
PHP 7.2 Replacement for JWT
<?php
declare(strict_types=1);
use ParagonIE\ConstantTime\Base64UrlSafe;
class JWTKiller
{
public static function sign(string $message, Key $key): string
{
$mac = sodium_crypto_auth($message, $key->getRaw());
@hackedunit
hackedunit / install-redis.md
Last active July 14, 2025 13:57
Install and configure Redis on Ubuntu 16.04 with systemd
  1. Install pre-requisities

sudo apt-get install build-essential tcl

  1. Install Redis
cd /tmp
curl -O http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
@nalgeon
nalgeon / region.md
Last active April 9, 2025 13:51
Список регионов России по ФИАС

Символы, которые имеет смысл брать в шрифт:

! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~©«»ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё‐‑‒–—―‘‚“„…‰™°₽€”’′″×

@artoodetoo
artoodetoo / nogap.php
Last active May 31, 2025 13:32
Efficient Geo IP location in MySQL database
#!/usr/bin/env php
<?php
/*
* Filter to fill the IP gaps in a MaxMind GeoLite tables.
*
* For every missing range in the file it puts a dummy one.
*/
$types = [
'asnum' => [0, 0, 1, "%s,%s,\"-\"\n"],
'blocks' => [2, 0, 1, "\"%s\",\"%s\",\"1\"\n"],