Skip to content

Instantly share code, notes, and snippets.

View dimabory's full-sized avatar
💭
🦁

Dmytro Borysovskyi dimabory

💭
🦁
View GitHub Profile
@dimabory
dimabory / event_facets.md
Created January 14, 2022 07:57
Event Facets

event_facets

@dimabory
dimabory / commitlint-install.sh
Last active September 4, 2019 12:30
The following script installs and configure `commitlint` and `husky` into your project.
#!/usr/bin/env bash
#
# Author: Dmytro Borysovskyi ([email protected])
# Date : 04.09.2019
#
# Description: The following script installs and configures `commitlint` and `husky` into your project.
#
VERSION=0.0.2
# just a helper for echo
@dimabory
dimabory / eslint-migration.sh
Last active April 21, 2020 10:17
This is a script to automatically install/configure ESLint into TS project.
#!/usr/bin/env bash
# Script Name: eslint-migration.sh
#
# Author: Dmytro Borysovskyi ([email protected])
# Date : 25.08.2019
#
# Description: The following script tries to automatically (partially)
# migrate TSLint to ESLint.
#
VERSION=1.2.0
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
@dimabory
dimabory / palindrome.js
Last active April 3, 2019 11:08
palindrome in the one line
const palindrome = str =>
(s = str.toLowerCase().replace(/[\W_]/g, '')) &&
s === [...s].reverse().join('')
@dimabory
dimabory / tricks.js
Created March 18, 2019 09:20
7 Tricks: JS objects rest and spread
// 1. add props
const user = { id: 100, name: 'Howard Moon'} // { id: 100, name: 'Howard Moon' }
const userWithPass = { ...user, password: 'Password!' } // { id: 100, name: 'Howard Moon', password: 'Password!'
// 2. merge obj
const part1 = { id: 100, name: 'Howard Moon' }
const part2 = { id: 100, password: 'Password!' }
@dimabory
dimabory / mi(a)cro-task.js
Created March 5, 2019 15:31
Explaining Microtasks and Macrotasks in Node
console.log('script start')
const interval = setInterval(() => {
console.log('setInterval')
}, 0)
setTimeout(() => {
console.log('setTimeout 1')
Promise.resolve().then(() => {
console.log('promise 3')
@dimabory
dimabory / dep.md
Created February 22, 2019 14:59
Dependency Elimination Principle
@dimabory
dimabory / deployment_patterns.md
Last active February 27, 2019 12:32
Deployment Patterns

Canary deployment

https://octopus.com/docs/deployment-patterns/canary-deployments
https://martinfowler.com/bliki/CanaryRelease.html


Canary deployments are a pattern for rolling out releases to a subset of users or servers. The idea is to first deploy the change to a small subset of servers, test it, and then roll the change out to the rest of the servers. The canary deployment serves as an early warning indicator with less impact on downtime: if the canary deployment fails, the rest of the servers aren't impacted.

canary-deployment.img

The basic steps of a canary deployment are: