Skip to content

Instantly share code, notes, and snippets.

View antnzr's full-sized avatar
🌞

Anton Nazarenko antnzr

🌞
  • 10:58 (UTC +05:00)
View GitHub Profile
@antnzr
antnzr / System Design.md
Created May 16, 2022 19:09 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@antnzr
antnzr / essentials_for_2022
Last active April 23, 2022 06:38
Apps for every day usage.
google-chrome
vlc
vscode
keeweb
telegram
mongo compass
insomnia
exodus
beekeeper
zoom ?
@antnzr
antnzr / letsencrypt.sh
Created December 24, 2021 10:27
generate certs with certbot
#!/bin/bash
if ! [ -x "$(command -v docker-compose)" ]; then
echo 'Error: docker-compose is not installed.' >&2
exit 1
fi
domains=(xxx.ru)
rsa_key_size=4096
nginx_container=nginx_xxx
@antnzr
antnzr / init.vim
Last active February 5, 2023 16:07
config for neovim ~/.config/nvim/init.vim
:set number relativenumber
:set nu rnu
:set autoindent " Indent a new line the same amount as the line just typed
:set tabstop=2 " Number of columns occupied by a tab
:set shiftwidth=2 " Width for autoindents
:set softtabstop=2 " See multiple spaces as tabstops so <BS> does the right thing
:set mouse=v " Enable mouse click
:set cc=100 " Set an 80 column border for good coding style
:set cursorline " highlight current cursorline
:set ttyfast " Speed up scrolling in Vim
@antnzr
antnzr / curl.md
Last active September 30, 2021 17:06 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@antnzr
antnzr / ultimate-ut-cheat-sheet.md
Created September 30, 2021 06:17 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@antnzr
antnzr / mongodb.workaround
Last active November 16, 2020 08:25
simple mongoDb replicaSet settings
# replicaSet
mkdir -p rs1 rs2 rs3
# or in windows /c/rs1 or /data/db/rs1
mongod --replSet myReplSet --logpath "rs1.log" --dbpath rs1 --port 27018 &
mongod --replSet myReplSet --logpath "rs2.log" --dbpath rs2 --port 27019 &
mongod --replSet myReplSet --logpath "rs3.log" --dbpath rs3 --port 27020 &
# then connect to
mongo --port 27018
@antnzr
antnzr / tokens.md
Created August 28, 2020 17:13 — 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

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@antnzr
antnzr / vbox_cli
Created August 14, 2020 06:21
virtual box cli
# a list of the VMs
VBoxManage list vms
# to run the "Ubuntu Server" VM
VBoxManage startvm "Ubuntu Server" --type headless
# to pause that VM
VBoxManage controlvm "Ubuntu Server" pause --type headless
# to restart that paused VM
@antnzr
antnzr / show-wifi-password
Last active August 12, 2020 12:32
show-wifi-password
open `cmd` as an admin
cd/
netsh
wlan show profile
# with your current SSID -> Beeline777
wlan show profile Beeline777 key=clear