Skip to content

Instantly share code, notes, and snippets.

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)
boot-repair
@dhruvdutt
dhruvdutt / react.jsx
Last active June 10, 2018 19:30
React - optimise creation of new functions in render
class SayHi extends Component {
// We can't use showMessage directly because it creates
// a new event handler every time you call it.
showMessage = (msg) => (e) => {
console.log(`Say ${msg}`, e)
}
// So instead, we need to create the event handlers beforehand,
// then call those inside of `render`.
showHiMessage = this.showMessage('Hi')
alias c="code"
alias d="docker"
alias gs="git status"
alias gl="git pull --rebase up"
alias gh="git push origin"
alias gr="git remote -v"
alias gc="git checkout"
alias gm="git commit -m"
alias gmm="git commit --amend"
module.exports = {
entry: './src/index.js'
}