Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| ------------------------------------------------------------------------ | |
| Basic | |
| ------------------------------------------------------------------------ | |
| git init | |
| инициализирует git в текущем каталоге (не забыть в консоле перейти в текущий каталог!!!) | |
| git status | |
| Показывает текущий статус измененных файлов проекта (кто в stage, кто нет) |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| @function prefix($property, $prefixes: (webkit moz o ms)) { | |
| $vendor-prefixed-properties: transform background-clip background-size; | |
| $result: (); | |
| @each $prefix in $prefixes { | |
| @if index($vendor-prefixed-properties, $property) { | |
| $property: -#{$prefix}-#{$property} | |
| } | |
| $result: append($result, $property); | |
| } | |
| @return $result; |
| <template> | |
| <form> | |
| <input | |
| v-for((val, key) in model) | |
| :key="key" | |
| :value="val" | |
| @input="model = ({ [key]: $event })" | |
| > | |
| </form> | |
| </template> |
There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket
You may use the same computer for work and personal development and need to separate your work.
When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.
You may have different projects you're working on where you would like to segregate your access.
// Case with 3 objects
const abc = (p1, p2, map = { a:0, c:1, b:2 }) => {
return ['DRAW', 'P1', 'P2'][(map[p1] - map[p2] + 3) % 3]
}// Case with 4 objects
const abcd = (p1, p2, map = { a:0, d:1, c:2, b:3 }) => {
return ['DRAW', 'P1', 'P2'][(map[p1] - map[p2]) % 2 && (4 - ((map[p1] - map[p2] + 4) % 4)) % 3 + 1]// Map all your event names with their handlers
type CustomEmitterEvents = {
eventA: (payload: number) => void
eventB: (payload: string) => void
eventC: (arg: boolean, msg: string) => void
}
// Interface of your sublcass, matches the EventEmitter method signatures| type UserStruct = { | |
| 'prefix:name': string | |
| 'prefix:age': number | |
| lastName: string | |
| } | |
| type RemovePrefix<T> = T extends `prefix:${infer U}` ? U : T | |
| type RemovePrefixFromStruct<T> = { | |
| [K in keyof T as RemovePrefix<K>]: T[K] |
| const uniqueFilter = (value: T, index: number, source: T[]): bolean => { | |
| return source.indexOf(value) === index | |
| } | |
| // Example | |
| const sourceArr = [1, 2, 3, 3, 4, 4, 4, 5] | |
| const uniqueArr = sourceArr.filter(uniqueFilter) // [1, 2, 3, 4, 5] |