Skip to content

Instantly share code, notes, and snippets.

View showmeyourhits's full-sized avatar
👀
looking at your pull request

Alexander Ozhigin showmeyourhits

👀
looking at your pull request
  • Limassol
  • 23:45 (UTC +03:00)
View GitHub Profile
@showmeyourhits
showmeyourhits / git_aliases.sh
Last active October 20, 2022 11:48
Mine Git aliases that I'm very used to.
# 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
class RequestStack {
constructor(options){
this.urlsList = options.urlsList;
this.maxCount = options.maxCount;
}
makeRequests = () => {}
}
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}`
/* 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} />
))}
// 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)
);
}
@showmeyourhits
showmeyourhits / jsconfig.json
Created November 23, 2017 07:24
VSCode config for kinoplan
{
"compilerOptions": {
"baseUrl": "./src/js",
"paths": {
"app/*": ["./app/*"]
}
},
"exclude": [
"node_modules",
"data",
🍾 7️⃣ 7️⃣ 7️⃣ 7️⃣ 🔥