Skip to content

Instantly share code, notes, and snippets.

@romanlex
romanlex / fetch.js
Last active June 4, 2018 11:33
Fetch multiple urls with fetch and save multiple response data
const RAW_CONTENT_TYPES = ['image/svg+xml']
/**
* Fetch url
*
* @param {string} url
*/
export const fetchResources = url => fetch(url, {
credentials: 'same-origin',
}).then((response) => {
@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 / rollup.config.js
Created October 1, 2018 11:07
Rollup config
import sass from 'rollup-plugin-sass'
import webworkify from 'rollup-plugin-webworkify'
import bundleWorker from 'rollup-plugin-bundle-worker'
import autoprefixer from 'autoprefixer'
import alias from 'rollup-plugin-alias'
import babel from 'rollup-plugin-babel'
import cjs from 'rollup-plugin-commonjs'
import cssurl from 'postcss-url'
import env from 'postcss-preset-env'
import json from 'rollup-plugin-json'
import peerDepsExternal from 'rollup-plugin-peer-deps-external'
import alias from 'rollup-plugin-alias'
import babel from 'rollup-plugin-babel'
import commonjs from 'rollup-plugin-commonjs'
import json from 'rollup-plugin-json'
import filesize from 'rollup-plugin-filesize'
import resolve from 'rollup-plugin-node-resolve'
import replace from 'rollup-plugin-replace'
import { eslint } from 'rollup-plugin-eslint'
import cleaner from 'rollup-plugin-cleaner'
@romanlex
romanlex / CollectEntriesRoutes.js
Created December 29, 2022 12:33
Plugin for collect routes path by entry points
const minimatch = require('minimatch')
const path = require('path')
const PLUGIN_NAME = 'CollectEntriesRoutesPlugin'
const routeMap = new Map()
/** @typedef {import("webpack").Compiler} Compiler */
/**
@romanlex
romanlex / BundleManifestPlugin.js
Last active June 12, 2025 12:44
Bundle manifest.json to defined var with ManifestPlugin for update frontend app
const { sources } = require('webpack')
const { getCompilerHooks } = require('webpack-manifest-plugin')
const PLUGIN_NAME = 'BundleManifestPlugin'
/** @typedef {import("webpack").Compiler} Compiler */
/**
* @typedef {Object} Options
* @property {string} to
@romanlex
romanlex / WG UDP hack on AsusWRT-Merlin.md
Created September 12, 2024 09:06 — forked from koolvn/01-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/
  • Делаем скрипт запускаемым