#!/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 |
#!/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>>; |
const palindrome = str => | |
(s = str.toLowerCase().replace(/[\W_]/g, '')) && | |
s === [...s].reverse().join('') |
// 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!' } |
console.log('script start') | |
const interval = setInterval(() => { | |
console.log('setInterval') | |
}, 0) | |
setTimeout(() => { | |
console.log('setTimeout 1') | |
Promise.resolve().then(() => { | |
console.log('promise 3') |
Architectural Styles and the Design of Network-based Software Architectures
https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation.pdf
http://qualityisspeed.blogspot.com/2015/04/dependency-elimination-example-primitive-support.html
Primitive Support:
- A primitive type (int, string, etc) representing a domain concept (megabytes, phone number, etc).
- A helper class that does something meaningful with that primitive (e.g. MegabyteConverter or PhoneNumberParser or FooHelper).
A Simple Example: E-mail Address Validation
public class UserSignup
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.
The basic steps of a canary deployment are: