git checkout <master>
git merge origin <master>
git checkout <feature>
git rebase <master>
- deal with any conflicts
git add .
git rebase --continue
git push origin <feature> --force
- 😎
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Portal_Teams.addTeamMember.request.js | |
{ | |
... | |
data: { | |
ClassName: 'Platform_Teams', | |
MethodName: 'addTeamMember', | |
Parameter: { | |
name: 'Name', | |
practitionerId: '0050k000000FtmGAAS', | |
clients: [ // Group and all it's entities |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// const { unionBy, isArray, merge, find } = _ | |
const deepArrayMerge = (initial, replacement, key) => unionBy(initial, replacement, key) | |
.map(item => merge({}, item, find(isArray(replacement) ? replacement : [replacement], { [key]: item[key] }))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless(booleanExpression, () => { | |
// Then callback | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const compose = (...functions) => (...start) => ( | |
functions.reduce((result, f) => ( | |
(typeof result === 'object') ? f(...result) : f(result) | |
), start) | |
) | |
/** | |
* Usage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function throttle(callback, wait, immediate = false) { | |
let timeout = null | |
let initialCall = true | |
return function() { | |
const callNow = immediate && initialCall | |
const next = () => { | |
callback.apply(this, arguments) | |
timeout = null | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Revived = () => { | |
createStore = (reducer) => { | |
let state | |
let listeners = [] | |
const getState = () => state | |
const dispatch = (action) => { | |
state = reducer(state, action) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function debounce(callback, wait, immediate = false) { | |
let timeout = null | |
return function() { | |
const callNow = immediate && !timeout | |
const next = () => callback.apply(this, arguments) | |
clearTimeout(timeout) | |
timeout = setTimeout(next, wait) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function safeSplice(array, start, deleteCount, ...replace) { | |
const removed = array.splice(start, deleteCount, ...replace) | |
return { | |
array: array, | |
removed: removed, | |
} | |
} | |
/** usage | |
const array = [1, 2, 3, 4, 5, 6] |
NewerOlder