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
import React from 'react'; | |
import Immutable from 'immutable'; | |
import classnames from 'classnames'; |
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
let React = {}; | |
React.addons = { | |
PureRenderMixin: null, | |
}; | |
const {PureRenderMixin} = React.addons; | |
const {a, b} = React.addons; |
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
var getDOMNode = 123; | |
const getDOMNode = () => { | |
return this.refs; | |
} | |
var test = getDOMNode(); | |
getOffset(this.refs.root.getDOMNode()); | |
this.refs.presetMenu.getDOMNode(); |
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
//Example: https://astexplorer.net/#/E25QuXone4 | |
//test_1.js | |
var var1 = 'var'; | |
//we want to change it to | |
//const var1 = 'var'; | |
//start template | |
export default function transformer(file, api) { | |
const j = api.jscodeshift; |
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
<snippet> | |
<content><![CDATA[ | |
constructor(props) { | |
super(props); | |
this.state = { | |
${1} | |
} | |
} | |
]]></content> | |
<tabTrigger>con</tabTrigger> |
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 script determines if current git state is the up to date master. If so | |
# it exits normally. If not it prompts for an explicit continue. This script | |
# intends to protect from versioning for NPM without first pushing changes | |
# and including any changes on master. | |
# | |
# First fetch to ensure git is up to date. Fail-fast if this fails. | |
git fetch; | |
if [[ $? -ne 0 ]]; then exit 1; fi; |
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
import Html exposing (..) | |
import Debug exposing (..) | |
import List exposing (..) | |
import Json.Decode exposing (..) | |
jsonStr : String | |
jsonStr = """ | |
[ | |
{ |
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
const id = 'archie_is_good_guy'; | |
// you may change listSetting for testing. | |
const listSetting = []; | |
//original function. | |
const targetListSetting = listSetting.filter(dd=>{ | |
return id === dd.bfid || id === dd.name_list_id; | |
})[0]; | |
//point-free experssion rewrite |
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
call plug#begin('~/.vim/plugged') | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'scrooloose/nerdtree' | |
Plug 'tpope/vim-repeat' | |
Plug 'jiangmiao/auto-pairs' | |
Plug 'airblade/vim-gitgutter' | |
Plug 'nathanaelkane/vim-indent-guides' | |
Plug 'itchyny/lightline.vim' |
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
//immutable_fractal_updater | |
state = [ | |
{ | |
key: 'key1' | |
value: true, | |
children: [ | |
{ | |
key: 'key4' | |
value: true, |