- Storing some data in url
- Sync url and app statement (app change url, url change app without page refresh)
- Proxy for remote work
- Store different build configs (prod, dev, stage, whatever)
- Project architecture documentation (where to store, how to write)
- Protection of the application from bad data with the backend or its inaccessibility
- Map and Interface Interactions
- Кeeping dependencies up to date
- Ui translations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check node is installed | |
node -v | |
# if not, install it | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash | |
nvm install stable | |
# install yarn | |
curl -o- -L https://yarnpkg.com/install.sh | bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs').promises; | |
const path = require('path'); | |
const ls = dir => fs.readdir(dir); | |
async function walk(dir) { | |
const filesList = await ls(dir); | |
const files = await Promise.all(filesList.map(async file => { | |
const filePath = path.join(dir, file); | |
const stats = await fs.stat(filePath); | |
if (stats.isDirectory()) return walk(filePath); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "vscode://schemas/color-theme", | |
"name": "City Lights Extended", | |
"type": "dark", | |
"colors": { | |
"breadcrumb.foreground": "#718ca1", | |
"breadcrumb.focusForeground": "#b7c5d3", | |
"breadcrumb.activeSelectionForeground": "#41505e", | |
"breadcrumbPicker.background": "#28323a", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Добавляем в trusted все необходимое: | |
firewall-cmd --permanent --zone=trusted --change-interface=docker0 | |
firewall-cmd --permanent --zone=trusted --add-port=80/tcp | |
firewall-cmd --permanent --zone=trusted --add-service=http | |
firewall-cmd --permanent --zone=trusted --add-service=https | |
firewall-cmd --permanent --zone=trusted --add-service=tcp | |
2. Ищем айпишник докер контейнера с nginx: | |
systemctl status docker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node build | |
Installing React / Redux RealWorld example... | |
Cloning... | |
Installing Angular RealWorld example... | |
Cloning... | |
Installing React / MobX RealWorld example... | |
Cloning... | |
Installing Vue RealWorld example... | |
Cloning... | |
Installing ClojureScript + re-frame RealWorld example... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { spawn } = require('child_process'); | |
const { readFile } = require('fs'); | |
const [app, ...args] = process.argv.slice(2, -1); | |
const pathToJson = process.argv.slice(-1)[0]; | |
readFile(pathToJson, 'utf8', (err, content) => { | |
if (err) { | |
console.error(err); | |
} else { | |
const command = spawn(app, [...args, content]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dmidecode 3.2 | |
Getting SMBIOS data from sysfs. | |
SMBIOS 3.0.0 present. | |
Table at 0x6AE81000. | |
Handle 0x0000, DMI type 0, 24 bytes | |
BIOS Information | |
Vendor: American Megatrends Inc. | |
Version: F.30 | |
Release Date: 10/30/2017 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function safeMerge(obj1, obj2) { | |
const keys = Object.keys(obj2).concat(Object.keys(obj1)); | |
const isInvalid = val => val === undefined || Number.isNaN(val) || val === null; | |
return keys.reduce((acc, key) => { | |
acc[key] = !isInvalid(obj2[key]) | |
? obj2[key] | |
: obj1[key]; | |
if (isInvalid(acc[key])) { | |
delete acc[key]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Author: @anontheanon | |
* Telegram: https://t.me/anontheanon | |
**/ | |
// Add inline comment /* */ | |
{ | |
"key": "ctrl+/", | |
"command": "editor.action.insertSnippet", // ctrl+oem_102 for back slash | |
"when": "editorHasSelection", |