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
@DreamShaded
DreamShaded / pug.md
Created January 1, 2020 22:19 — forked from neretin-trike/pug.md
Туториал по HTML препроцессору Pug (Jade)
Создание и настройка ssh ключей
1. Запустите Git Bash и введите
ssh-keygen -t rsa -C "your@email.ru"
2. На вопрос “Enter file in which to save the key” введите id_rsa и нажмите “Enter”
3. Далее введите любой пароль, и подтвердите его (лучше пропустить, потому что каждый раз при соединении с github, придется вводить его)
@DreamShaded
DreamShaded / xclip_ssh_rsa.sh
Created May 2, 2021 11:02 — forked from orendon/xclip_ssh_rsa.sh
linux copy ssh rsa key, xclip xsel pbcopy
xclip -sel clip < ~/.ssh/id_rsa.pub
# in case you get a display null error
DISPLAY=:0 xclip -sel clip < ~/.ssh/id_rsa.pub
# osx
pbcopy < ~/.ssh/id_rsa.pub
@DreamShaded
DreamShaded / eslint_prettier_airbnb.md
Created May 10, 2021 22:14 — forked from bradtraversy/eslint_prettier_airbnb.md
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@DreamShaded
DreamShaded / i3-shortcuts-screenshot.md
Created June 14, 2021 22:22 — forked from dianjuar/i3-shortcuts-screenshot.md
My i3 shortcuts to take screenshots

Requirements

  • maim
  • xclip

Set-up

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

# Screenshots
@DreamShaded
DreamShaded / advanced-formatting-github-markdown.md
Created June 16, 2021 08:28 — forked from apaskulin/advanced-formatting-github-markdown.md
Tips and tricks for more formatting options in GitHub Markdown

Advanced Formatting in GitHub Markdown

GitHub Flavored Markdown lets you create useful documents in GitHub and GitHub Enterprise using .md files. Like other varieties of markdown, GitHub Markdown tries to be as readable as possible in its raw form, resulting in an intentionally limited set of formatting options. However, these options can feel restrictive when dealing with complex content.

Although GitHub Markdown strips out most HTML tags, here are a few tricks that can give you more flexibility when formatting your documents. These advanced formatting options can make your documents more useable, but they come at the expense of plain text readability, so use with caution.

@DreamShaded
DreamShaded / tokens.md
Created September 4, 2021 20:25 — forked from zmts/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@DreamShaded
DreamShaded / what-forces-layout.md
Created September 19, 2021 13:51 — 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
@DreamShaded
DreamShaded / traefik.md
Created October 16, 2021 23:04 — forked from dancheskus/traefik.md
Traefik, как обратный прокси в Docker (пример с 2 react проектами)

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

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

Цели

  • Запустить traefik в одном контейнере
  • Запустить другие проекты в других контейнерах
  • Соединить все контейнеры в одну docker cеть
  • Настроить контейнеры с проектами так, что-бы они объясняли traefik'у, какие url ведут на конкретный проект
@DreamShaded
DreamShaded / .gitlab-ci.yml
Created October 24, 2021 21:10 — forked from bkuhl/.gitlab-ci.yml
How to use docker-compose in GitLab CI
# Using edge-git ensures we're always pulling the latest
# You can lock into a specific version using the *-git tags
# on https://hub.docker.com/_/docker/
image: docker:edge-git
services:
- docker:dind
# If you only need compose in a specific step definitely put this
# only in that step so it's not executed unnecessarily
before_script: