Skip to content

Instantly share code, notes, and snippets.

View mattcreager's full-sized avatar

Matthew Creager mattcreager

View GitHub Profile
@gaearon
gaearon / ClassNameMixin.js
Last active March 23, 2018 17:18
BEM in React
'use strict';
var React = require('react'),
classSet = require('react/lib/cx'),
_ = require('underscore');
var ClassNameMixin = {
propTypes: {
className: React.PropTypes.string,
context: React.PropTypes.string
@jeffandersen
jeffandersen / .bashrc
Last active October 6, 2015 21:28
Super simple git aliases that are based around prefixing branch names with your Github username
determineBranch() {
GIT_USERNAME=$(git config --global user.user)
if [ -z "$GIT_USERNAME" ]; then
echo "No user found in git config. Set key 'user' to your github username."
BRANCH_NAME=$1
else
if [ -n "$1" ]; then
if [[ $1 == *-n* && -n "$2" ]]; then
BRANCH_NAME=$2
else