Skip to content

Instantly share code, notes, and snippets.

View DreamShaded's full-sized avatar
🚀
Too much projects

Roman Troitsky DreamShaded

🚀
Too much projects
View GitHub Profile
@mewset
mewset / playwright-arch-linux-fix.md
Created January 5, 2026 19:59
Playwright on Arch Linux - use system Chromium instead of bundled

Playwright on Arch Linux - just use system Chromium

So you're on Arch and Playwright is being a pain? Yeah, same. Here's what happens:

$ npm init playwright@latest
BEWARE: your OS is not officially supported by Playwright; installing dependencies for ubuntu24.04-x64 as a fallback.
Installing dependencies...
sh: line 1: apt-get: command not found
Failed to install browsers
@dancheskus
dancheskus / traefik.md
Last active July 7, 2026 10:23
Traefik, как обратный прокси в Docker (пример с 2 react проектами)

Traefik, как обратный прокси в Docker (пример с 2 react проектами)

В результате будет 2 react проекта на 1 сервере доступных по разным ссылкам

Цели

  • Запустить traefik в одном контейнере
  • Запустить другие проекты в других контейнерах
  • Соединить все контейнеры в одну docker cеть
  • Настроить контейнеры с проектами так, что-бы они объясняли traefik'у, какие url ведут на конкретный проект
@tomhicks
tomhicks / plink-plonk.js
Last active July 2, 2026 03:20
Listen to your web pages
@MarioHewardt
MarioHewardt / enable_ebpf_on_wsl2
Last active April 14, 2026 17:19
Enable EBPF on WSL2
By default, EBPF programs will not run on WSL2 due to required kernel modules missing. The following example error is an
indication of this problem:
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.84-microso
ft-standard/modules.dep.bin'
modprobe: FATAL: Module kheaders not found in directory /lib/modules/4.19.84-microsoft-standard
chdir(/lib/modules/4.19.84-microsoft-standard/build): No such file or directory
To fix this you need to rebuild the WSL2 kernel with the missing kernel modules. The below instructions are for Ubuntu 18.04 WSL2.
1. git clone https://github.com/microsoft/WSL2-Linux-Kernel.git
@dianjuar
dianjuar / i3-shortcuts-screenshot.md
Last active August 16, 2026 19:00
My i3 shortcuts to take screenshots

Requirements

  • maim
  • xclip

Set-up

Set this on your i3 config file ~/.i3/config

# Screenshots
@KRostyslav
KRostyslav / tsconfig.json
Last active July 26, 2026 20:27
tsconfig.json с комментариями.
// Файл "tsconfig.json":
// - устанавливает корневой каталог проекта TypeScript;
// - выполняет настройку параметров компиляции;
// - устанавливает файлы проекта.
// Присутствие файла "tsconfig.json" в папке указывает TypeScript, что это корневая папка проекта.
// Внутри "tsconfig.json" указываются настройки компилятора TypeScript и корневые файлы проекта.
// Программа компилятора "tsc" ищет файл "tsconfig.json" сначала в папке, где она расположена, затем поднимается выше и ищет в родительских папках согласно их вложенности друг в друга.
// Команда "tsc --project C:\path\to\my\project\folder" берет файл "tsconfig.json" из папки, расположенной по данному пути.
// Файл "tsconfig.json" может быть полностью пустым, тогда компилятор скомпилирует все файлы с настройками заданными по умолчанию.
// Опции компилятора, перечисленные в командной строке перезаписывают собой опции, заданные в файле "tsconfig.json".
@mjgartendev
mjgartendev / nuxt.config.js
Created May 25, 2018 04:36
An example nuxt.config.js file heavily commented from the nuxt and vue-meta documentation examples
module.exports = {
/*
Headers of the page
- Nuxt.js uses vue-meta to update the headers and html attributes of your application.
- Nuxt.js configures vue-meta with these options:
{
keyName: 'head', // the component option name that vue-meta looks for meta info on.
attribute: 'data-n-head', // the attribute name vue-meta adds to the tags it observes
ssrAttribute: 'data-n-head-ssr', // the attribute name that lets vue-meta know that meta info has already been server-rendered
tagIDKeyName: 'hid' // the property name that vue-meta uses to determine whether to overwrite or append a tag
@neretin-trike
neretin-trike / stylus.md
Last active May 31, 2025 17:47
Туториал по CSS препроцессору Stylus
@neretin-trike
neretin-trike / pug.md
Last active July 11, 2026 02:01
Туториал по HTML препроцессору Pug (Jade)
@neretin-trike
neretin-trike / bem.md
Last active April 10, 2026 08:34
Способ организации код - методология БЭМ

Методология БЭМ

БЭМ (Блок, Элемент, Модификатор) — компонентный подход к веб-разработке. В его основе лежит принцип разделения интерфейса на независимые блоки. Он позволяет легко и быстро разрабатывать интерфейсы любой сложности и повторно использовать существующий код, избегая.

Основная терминология

Блок - часть страницы, являющаяся логически независимой от остального наполнения. Представляет собой «строительную единицу» для сайта (на примере конструктора лего - это отдельный «кирпичик»). Блок не отвечает за свое расположение. Он задает внутренние свойства (размеры, шрифты и т.д.).

Элемент - часть блока, которая должна входить в состав блока и не иметь какого-либо смысла отдельно от блока.