Skip to content

Instantly share code, notes, and snippets.

View romanlex's full-sized avatar

Roman O romanlex

View GitHub Profile
@koolvn
koolvn / WG UDP hack on AsusWRT-Merlin.md
Last active January 8, 2025 17:04
UDP Trash Hack for WireGuard on AsusWRT Merlin

UDP Trash Hack for WireGuard on AsusWRT Merlin

Подготовка

Проверяем, что включен пункт меню Enable JFFS custom scripts and configs

image

Установка

  • Кладём файл wgclient-start в /jffs/scripts/
  • Делаем скрипт запускаемым
use Phalcon\Session\AdapterInterface;
use Phalcon\Cache\Backend\Redis as RedisCache;
use Phalcon\Cache\Frontend\None as FrontendNone;
class Redis implements \SessionHandlerInterface, AdapterInterface
{
const SESSION_ACTIVE = 2;
const SESSION_NONE = 1;
@zerobias
zerobias / flow-ignore.js
Last active June 20, 2018 06:27
Make flow ignore all unrelated deps and work much faster
//@flow
const {
readdirSync,
outputFileSync,
pathExistsSync,
//$todo
readFileSync,
} = require('fs-extra')
@zmts
zmts / tokens.md
Last active January 4, 2025 09:22
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@staltz
staltz / introrx.md
Last active January 10, 2025 18:38
The introduction to Reactive Programming you've been missing
@petemcw
petemcw / 01-README.md
Last active February 2, 2024 11:50
Mac OS X LEMP Configuration

Mac OS X LEMP Configuration

This Gist is a collection of configuration files that can be used to easily setup a Homebrew-based LEMP stack on Mac OS X.

Files in this repository are numbered and named for ordering purposes only. At the top of each file is a section of metadata that denote what component the file belongs to and the default name & location of the file. Feel free to implement it however you want.

Note: some configuration files have hard-coded paths to my user directory -- fix it for your setup

Setup

@dr-dimitru
dr-dimitru / Social RESTful URLs snippet.md
Last active January 28, 2023 03:57
Social links, +1s and shares using only HTML (no JS)
@christianhanvey
christianhanvey / modx-upgrade.sh
Last active November 1, 2017 16:40
A shell script to help automate the upgrade of a MODX Revolution installation
#!/bin/bash
# modx-upgrade.sh
# ---------------
# A shell script to help automate the upgrade of a MODX Revolution installation
# This script is for traditional installations only - not advanced
#
# Instructions:
# 1. Update the config section with your own site specific details
# 2. Upload this file to your server, preferably outside of web root