Skip to content

Instantly share code, notes, and snippets.

View avin's full-sized avatar
🐒
Code Monkey

Avin Lambrero avin

🐒
Code Monkey
View GitHub Profile
domain ip subnet provider
sun6-22.userapi.com 95.142.206.2 95.142.200.0/21 VKONTAKTE-FRONT
pptest.userapi.com 87.240.190.64 87.240.160.0/19 VKONTAKTE-FRONT
sun9-101.userapi.com 87.240.190.64 87.240.160.0/19 VKONTAKTE-FRONT
travel.yandex.ru 93.158.134.81 93.158.134.0/24 YANDEX-93-158-134-0
trk.mail.ru 95.163.41.56 95.163.40.0/21 VK-FRONT
1l-api.mail.ru 217.69.139.87 217.69.136.0/21 VK-FRONT
m.47news.ru 185.65.149.156 185.65.149.156/32 QRATOR-14151
crowdtest.payment-widget-smarttv.plus.tst.kinopoisk.ru 93.158.134.59 93.158.134.0/24 YANDEX-93-158-134-0
external-api.mediabilling.kinopoisk.ru 87.250.251.48 87.250.251.0/24 YANDEX-87-250-251-0
@avin
avin / install.sh
Last active July 21, 2025 09:05
Quick create dotfiles with copy-paste
mkdir -p ~/bin ~/tmp ~/logs ~/backup ~/scripts
########################
## Setup .bashrc
########################
cat >~/.bashrc <<'EOF'
# Check for interactive mode
case $- in *i*) ;; *) return ;; esac
@avin
avin / sysctl.conf
Created July 14, 2025 10:21
Tune /etc/sysctl.conf to speed up network connections to server
# Basic BBR Settings
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
# Buffers
net.core.rmem_max = 12582912
net.core.wmem_max = 12582912
net.ipv4.tcp_rmem = 4096 87380 12582912
net.ipv4.tcp_wmem = 4096 16384 12582912
@avin
avin / script.js
Created May 26, 2025 07:46
LLM Text fixer for slack-mod (https://github.com/avin/slack-mod)
(() => {
function setupXhrInterceptor(interceptorRules) {
const OriginalXMLHttpRequest = window.XMLHttpRequest;
const originalOpen = OriginalXMLHttpRequest.prototype.open;
const originalSend = OriginalXMLHttpRequest.prototype.send;
const getCancelErrorResponseText = () => {
return JSON.stringify({
ok: false,
@avin
avin / otp.ps1
Created April 22, 2025 08:53
Generate TOTP and paste it into the clipboard
$secret = "XXXXXXXXXXXXXXXXXXXXXXXXXX"
$length = 6
$window = 30
function Get-Otp(){
param(
[Parameter(Mandatory=$true)]$SECRET,
$LENGTH = 6,
$WINDOW = 30
)
@avin
avin / caprover.yaml
Last active May 30, 2024 10:27
Docker hub mirror caprover app
captainVersion: 4
services:
$$cap_appname:
image: registry:2
ports:
- "5000:5000"
environment:
REGISTRY_PROXY_REMOTEURL: https://registry-1.docker.io
caproverOneClickApp:
variables:
@avin
avin / instruction.md
Created May 7, 2024 17:56
Raspberry Pi OpenWRT WireGuard router (+keep vanilla internet on the device)
echo "201 vpn" >> /etc/iproute2/rt_tables

Edit /etc/config/network

config interface 'loopback'
        option device 'lo'
@avin
avin / setup.md
Last active May 6, 2024 17:34
Wireguard via Docker

Prepare

sudo mkdir -p /opt/wireguard/config
sudo nano /opt/wireguard/docker-compose.yml

docker-compose.yml content:

---
services:
@avin
avin / setup.md
Created March 30, 2024 10:03
Setup OpenWRT router with wireguard client

Preconfigure two interfaces wan and lan (if not already configured)

vi /etc/config/network

config interface 'wan'
        option device 'eth0'
        option proto 'dhcp'

config interface 'lan'
@avin
avin / App.tsx
Last active September 14, 2023 19:35
Slim form control
import React, {memo, useCallback, useEffect, useRef} from 'react';
import {useControl, useForm, useValidation} from './utils/useFormState';
// function useTraceUpdate(props: any) {
// const prev = useRef(props);
// useEffect(() => {
// const changedProps = Object.entries(props).reduce((ps: any, [k, v]) => {
// if (prev.current[k] !== v) {
// ps[k] = [prev.current[k], v];
// }