This file contains 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
#!/bin/sh | |
git checkout master | |
git remote update --prune | |
git branch -r --merged | grep -v master | grep -v develop | sed -e 's/origin\//:/' | xargs git push origin | |
git branch --merged | grep -v master | grep -v develop | xargs git branch -d |
This file contains 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
_.mixin({ | |
/** | |
* getNestedObjectPropertyByPath | |
* | |
* Helps in accessing a nested object property via a path string | |
* See http://stackoverflow.com/a/6491621/679369 | |
* | |
* @param {object} o An object | |
* @param {string} s A string representing the key of a property to return | |
* @return {*} The property of o represented by s |
This file contains 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
############################## | |
# _ | |
# | |_ _ __ ___ _ ___ __ | |
# | __| '_ ` _ \| | | \ \/ / | |
# | |_| | | | | | |_| |> < | |
# \__|_| |_| |_|\__,_/_/\_\ | |
# | |
############################# | |
# | |
# COPY AND PASTE |
This file contains 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
import React from 'react'; | |
import _ from 'lodash'; | |
export default function (Base) { | |
return class extends Base { | |
constructor() { | |
super(); | |
if (!_.isFunction(this.getStores)) { | |
throw new Error('connectToStores() expects the decorated component to have a getStores() method.'); |
This file contains 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
import Immutable from 'immutable'; | |
import { Component } from 'react'; | |
import _ from 'lodash'; | |
import shallowEqual from 'shallowequal'; | |
export default class BaseComponent extends Component { | |
constructor() { | |
super(...arguments); | |
this.state = { data: this.getDefaultState() }; |