Skip to content

Instantly share code, notes, and snippets.

View alexey-yakovlev's full-sized avatar

Alexey Yakovlev alexey-yakovlev

View GitHub Profile

Полезные консольные команды и утилиты

  • echo [что_вывести] - вывод строки в STDOUT (например, echo $DT выведет в консоль значение переменной $DT)
  • echo [что_вывести] >&2 — вывод строки в STDERR
  • pwd — вывести путь к текущей директории
  • whoami — вывести логин текущего пользователя

Работа с файловой системой

  • cd [путь] — перейти в заданную папку
@alexey-yakovlev
alexey-yakovlev / what-forces-layout.md
Created August 4, 2022 12:53 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@alexey-yakovlev
alexey-yakovlev / setup.md
Created May 30, 2022 05:30 — forked from carsenchan/setup.md
Eslint + Prettier for React Typescript

Project setup

Purpose

To ensure that the coding style is consisitent in the project from different members, for React + Typescript projects, it is recommanded set up ESlint and Prettier.

  1. Install the required dev dependencies:
yarn add eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-react -D
@alexey-yakovlev
alexey-yakovlev / .bashrc
Created October 1, 2020 10:07 — forked from justintv/.bashrc
Display git branch in bash prompt
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer!
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ "
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty!
# ~/code/web:beta_directory$ git checkout master
# Switched to branch "master"
# ~/code/web:master$ git checkout beta_directory
# Switched to branch "beta_directory"
// Construct Single Node
class Node {
constructor(data, next = null) {
this.data = data;
this.next = next;
}
}
// Create/Get/Remove Nodes From Linked List
class LinkedList {
@alexey-yakovlev
alexey-yakovlev / vscode_shortcuts.md
Created April 28, 2019 11:13 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

  • For mac, replace "Ctrl" with "cmd" and "Alt" with "option"

Official List of all commands