Skip to content

Instantly share code, notes, and snippets.

View sitano's full-sized avatar

Ivan Prisyazhnyy sitano

View GitHub Profile
@wiktorbgu
wiktorbgu / Mikrotik-WireGuard-anti-DPI.md
Last active December 5, 2025 16:31
Mikrotik WireGuard anti DPI

Чуть подправил скрипт , чтобы лишний раз не бегал по клиентским пирам, которые подключаются к этому роутеру, а только где роутер как клиент.
Работает убойно! Proton и Warp пробивает)

Upd.: увеличил время в фильтре до 2м30с как защита от ложных срабатываний у медленных подключений.
Считаю выполнение скрипта раз в 2 минуты средним нормальным значением.
Так же добавил в скрипт закомментированную строку с возможность исключения какого-либо wg интерфейса из проверки.

Если при выполнении скрипта на этапе генерации трафика выходит ошибка в лог, то:
выполнить команду /system/device-mode/print

@httpsx
httpsx / WireGuard DPI обход РКН - Windows.md
Last active November 30, 2025 19:45
WireGuard DPI обход РКН - Windows

Для обхода блокировки достаточно отправить 1 любой udp пакет, тем самым нарушим начальное определение протокола WireGuard
Способ с использованием Windows PowerShell. Без скачивания Nmap и подобного софта.

Шаг 0: Отключитесь от всех туннелей.

Шаг 1: Редактируем Клиент конфиг

Добавим в него "ListenPort", это позволит иметь статичный порт на котором будет работать WireGuard
Нажмите ПКМ на нужный "туннель" и выберите "Редактировать выбранный туннель..." Step1

После DNS добавляем новую строку

@iamwildtuna
iamwildtuna / gist:7772b7c84a11bf6e1385f23096a73a15
Last active December 7, 2025 13:20
VPN IP Addresses (IP адреса ChatGPT, Copilot, Meta, Facebook, Instagram, YouTube, Medium, X ex. Twitter, Discord)
Meta (Instagram, Facebook)
// Узлы
157.240.253.174, 157.240.253.172, 157.240.253.167, 157.240.253.63, 157.240.253.32
157.240.252.174, 157.240.252.172, 157.240.252.167, 157.240.252.63, 157.240.252.38
57.144.112.34, 57.144.110.1, 157.240.205.174, 87.245.223.97
// Подсети
213.102.128.0/24
204.15.20.0/22
199.201.0.0/16
@sitano
sitano / leetcode_helpers.cc
Last active July 9, 2025 08:35
leetcode c++ headers
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,avx,mmx,abm,popcnt,tune=native")
int const _ = [] { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); return 0; } ();
template <class T> using vec = vector<T>;
using T = TreeNode;
using ll = long long;
using vi = vec<int>;
@lalitmee
lalitmee / settings.lua
Created March 29, 2021 10:59
nvim settings
local fn = vim.fn
local api = vim.api
local executable = function(e)
return fn.executable(e) > 0
end
local opts_info = vim.api.nvim_get_all_options_info()
local opt = setmetatable(
{}, {
@maratori
maratori / .golangci.yml
Last active December 5, 2025 13:50
Golden config for golangci-lint
# ==================================================================================================
#
# NOTICE
#
# This gist is no longer maintained. It was moved to repo:
#
# https://github.com/maratori/golangci-lint-config
#
# Full history and all v2 releases are preserved in the repo.
#
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active December 2, 2025 17:16
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

WARNING: Article moved to separate repo to allow users contributions: https://github.com/raysan5/custom_game_engines

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like [Unreal](https:

@rigred
rigred / PCI-e_bus_bandwidth_calc.md
Last active June 15, 2023 13:10
PCI-e bus bandwidth calculation

How PCI-e bandwidth and actual true data bandwidth can be calculated.

PCI-e 1.x uses an 8/10b encoding scheme, so to send 8 bits of data, 10 bits of encoded data must be transfered. 2 of those bits are there as error checking and correction bits to account for interference which is very common on fast buses. SATA btw also uses 8b/10b encoding, you loose 20% of bandwidth (1-8/10) to get the data across.

PCI-e 1.0 is clocked at 2.5Ghz, it sends 1 bit per clock cycle and each lane corresponds to a 1 bit bi-directional serial channel. Which is kind of neat since here 'Gigatransfers' indicate 1 bit transfered for every clock cycle. This should immediately tell us that unlike FSB which transfers multiple bts per cycle in a parallel fashion, PCI-e is serial, since we are sequentially throwing 1 bit of data per cycle onto the bus and it takes multiple cycles to send a full byte. While on a parallel bus multiple bytes can be sent per cycle.

unsigned integers

-O3

|               ns/op |                op/s |   MdAPE | benchmark
|--------------------:|--------------------:|--------:|:----------------------------------------------
|                3.03 |      329,748,861.72 |    3.2% | `(a + b) / 2`
|                3.01 |      332,744,047.95 |    4.1% | `a + ((b - a) / 2)`
|                3.01 |      331,690,526.09 |    2.3% | `A/2 + B/2 + (A & B & 1)`
|                3.13 |      318,986,706.11 |    2.3% | `std::midpoint()`