Skip to content

Instantly share code, notes, and snippets.

View romanlex's full-sized avatar

Roman O romanlex

View GitHub Profile
@romanlex
romanlex / WG UDP hack on AsusWRT-Merlin.md
Created September 12, 2024 09:06 — forked from koolvn/WG UDP hack on AsusWRT-Merlin.md
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/
  • Делаем скрипт запускаемым
@romanlex
romanlex / 01-README.md
Created July 4, 2018 15:29 — forked from petemcw/01-README.md
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

@romanlex
romanlex / generateFlowModuleNameMappers.js
Created May 17, 2018 12:19 — forked from turadg/generateFlowModuleNameMappers.js
Helper to create .flowconfig module name mapper
#!/usr/bin/env node
/**
* Flowtype understands Node (or Haste) imports but not Webpack.
*
* Many codebases have webpack set up like:
* src/foo.js
* src/components/Bar.jsx
*
* And then import them like `require('foo')` or `require/components/Bar.jsx`
*
const emptyCounterparties = [];
const emptyProducts = [];
/** Список банков */
export const getCounterparties = (state) => state.orders.data.counterparties;
/** Конкретный банк */
export const getCounterparty = (state, props) =>
state.orders.data.counterparties[props.bankId] || null;
@romanlex
romanlex / introrx.md
Created December 6, 2017 11:38 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@romanlex
romanlex / redux-is-smarter-than-you-think.md
Created December 1, 2017 12:50 — forked from armw4/redux-is-smarter-than-you-think.md
Optimizing your react components via redux....shouldComponentUpdate for free and more...

The Beginning

Yes...it's true...redux is smart....smarter than you even know. It really does want to help you. It strives to be sane and easy to reason about. With that being said, redux gives you optimizations for free that you probably were completely unaware of.

connect()

connect is the most important thing in redux land IMO. This is where you tie the not between redux and your underlying components. You usually take state and propogate it down your component hiearchy in the form of props. From there, presentational