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
# Commit + amend = CommEnd | |
git config --global alias.commend 'commit --amend --no-edit' | |
# Useful for temporary work saving - git stash is not safe | |
git config --global alias.tempo 'commit -m tempo --all --no-verify' | |
# Commend + Please = Code Review | |
git config --global alias.please 'push --force-with-lease' | |
# Undo last commit changes - used with git tempo |
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
class RequestStack { | |
constructor(options){ | |
this.urlsList = options.urlsList; | |
this.maxCount = options.maxCount; | |
} | |
makeRequests = () => {} | |
} |
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 isNotValidRE = /[^A-Za-z]/; | |
const matchRLE = /([A-Za-z])\1*/g; | |
function RLE(str) { | |
if (str && isNotValidRE.test(str)){ | |
throw new Error('Not valid string: ' + str); | |
} | |
return str.replace( | |
matchRLE, | |
match => match.length === 1 ? match : `${match[0]}${match.length}` |
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
/* Pass list as props ... */ | |
class Song extends React.Component { | |
render = () => <span>{this.props.song.title}</span> | |
} | |
class Album extends React.Component { | |
render = () => ( | |
<section> | |
{this.props.songs.map(song => ( | |
<Song song={song} /> | |
))} |
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
// https://github.com/facebook/react/blob/913a125ad51777ffec91eedefa03c534a7590395/packages/react-reconciler/src/ReactFiberClassComponent.js#L191 | |
if (type.prototype && type.prototype.isPureReactComponent) { | |
return ( | |
!shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) | |
); | |
} |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"baseUrl": "./src/js", | |
"paths": { | |
"app/*": ["./app/*"] | |
} | |
}, | |
"exclude": [ | |
"node_modules", | |
"data", |
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
🍾 7️⃣ 7️⃣ 7️⃣ 7️⃣ 🔥 |