Skip to content

Instantly share code, notes, and snippets.

View K3TH3R's full-sized avatar

Kether Saturnius K3TH3R

View GitHub Profile
@K3TH3R
K3TH3R / fat_arrow_binding.js
Created July 25, 2015 23:26
Using arrow functions to easily bind functions for use inside of React Components
// 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)} />;
}
}
@K3TH3R
K3TH3R / .zshrc
Created May 3, 2015 20:13
Quickly setup Bitbucket/Github repos from your command line
# 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 git@github.com:USERNAME/$1.git;