This file contains hidden or 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
// This is how you might traditionally bind component | |
// functions to make sure you're accessing the right scope | |
class OldButton extends React.Component { | |
handleClick (e){ /* ... */ } | |
render() { | |
return <button onClick={this.handleClick.bind(this)} />; | |
} | |
} |
This file contains hidden or 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
# New Github repo | |
# ----------------------------- | |
# Make sure to replace the "USERNAME" portion with your own | |
# GitHub username. To start a new public GitHub repo, | |
# simply do this from your command line: | |
# newgh REPO_NAME | |
function newgithub(){ | |
curl -u 'USERNAME' https://api.github.com/user/repos -d "{\"name\":\"$1\"}"; | |
git init; | |
git remote add origin [email protected]:USERNAME/$1.git; |
NewerOlder