A Pen by chris anderson on CodePen.
EjZeYG ('-' * 6)
A Pen by chris anderson on CodePen.
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
# First: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
#go to /usr/local/lib and delete any node and node_modules | |
cd /usr/local/lib | |
sudo rm -rf node* |
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
const initialState = { | |
fieldMap = [] | |
} | |
// take result, push objects to fielMap array | |
const createFieldMap = (result, fieldMap, fieldMapMade) => { | |
if (!fieldMapMade) { | |
result.headers.map((key, index) => { | |
const cardIndex = index; | |
const samplesArr = []; |
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, { Component, PropTypes } from 'react'; | |
import {reduxForm} from 'redux-form'; | |
import { connect } from 'react-redux'; | |
import { bindActionCreators } from 'redux'; | |
import * as dataMapActions from 'redux/modules/dataMap'; | |
import {updateFieldMap} from 'redux/modules/dataMap'; | |
@connect( | |
state => ({ | |
fieldMap: state.dataMap.fieldMap, |
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
// src/container/form1.js | |
// when i add a file to this input, it triggers the FORM2 reducer's case: redux-form/CHANGE' and calls function in FORM2. | |
<input type="file" {...fileField}/> | |
// src/redux/modules/form1.js | |
export default function reducer(state = initialState, action = {}) { | |
switch (action.type) { | |
case FILE_SELECTED: | |
return {....} | |
} |
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
install homebrew | |
> ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
install Java w/ homebrew **Dont install java with oracle** | |
> brew tap caskroom/cask | |
> brew install brew-cask | |
If you get the error "already installed", follow the instructions to unlink it, then install again: | |
> brew unlink brew-cask | |
> brew install brew-cask |
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
'.source.js': | |
'component': | |
'prefix': 'comp' | |
'body': """ | |
import React, { Component, PropTypes } from 'react'; | |
import { | |
${1:Name}style | |
} from '${1:Name}Styles.js'; |
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
// check version | |
node -v || node --version | |
// list locally installed versions of node | |
nvm ls | |
// list remove available versions of node | |
nvm ls-remote | |
// install specific version of node |
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
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
OlderNewer