Skip to content

Instantly share code, notes, and snippets.

View avin's full-sized avatar
🤡

Avin Lambrero avin

🤡
View GitHub Profile
@avin
avin / .clang-format
Created December 30, 2025 16:02
Best Modern C++ clang-format
---
Language: Cpp
BasedOnStyle: LLVM
IndentWidth: 4
ColumnLimit: 120
PointerAlignment: Left
Standard: Auto
FixNamespaceComments: true
BreakBeforeBraces: Attach
AllowShortFunctionsOnASingleLine: Empty
@avin
avin / ExplorerPatcher.reg
Created December 27, 2025 16:20
ExplorerPatcher settings
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
"ImportOK"=dword:00000001
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
"OldTaskbar"=dword:00000002
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_TaskbarPosition"=dword:00000001
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_MMTaskbarPosition"=dword:00000003
@avin
avin / no-hover.js
Last active December 9, 2025 11:56
VSCode/Cursor hide file explorer hover tooltips
(function() {
let styleElement = null;
let explorer = null;
function createStyle() {
if (!styleElement) {
styleElement = document.createElement('style');
styleElement.textContent = `.workbench-hover-container { display: none !important; }`;
document.head.appendChild(styleElement);
}
@avin
avin / linux-history.md
Created November 16, 2025 18:28
История Linux

История революционных моментов Linux

1991 - Рождение Linux

  • 25 августа: Линус Торвальдс объявляет о создании нового ядра операционной системы в группе comp.os.minix
  • 17 сентября: Выпуск Linux 0.01 (10,239 строк кода)
  • Октябрь: Linux 0.02 - первая публично доступная версия

1992 - Лицензирование и первые дистрибутивы

  • Январь: Linux переходит на лицензию GPL v2 (революционное решение, определившее будущее проекта)
  • Появление первых дистрибутивов: MCC Interim Linux, TAMU
@avin
avin / algos.md
Created November 14, 2025 09:53
Шпаргалка по алгоритмическим паттернам на JavaScript

JavaScript Алгоритмические Паттерны - Шпаргалка

1. Arrays & Hashing

Hash Map/Set для поиска O(1)

// Two Sum - найти два числа с заданной суммой
function twoSum(nums, target) {
    const map = new Map(); // число -> индекс
    for (let i = 0; i < nums.length; i++) {
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
)