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
/** | |
* Converts paths defined in tsconfig.json to the format of | |
* moduleNameMapper in jest.config.js. | |
* | |
* For example, {'@alias/*': [ 'path/to/alias/*' ]} | |
* Becomes {'@alias/(.*)': [ '<rootDir>/path/to/alias/$1' ]} | |
* | |
* @param {string} srcPath | |
* @param {string} tsconfigPath | |
*/ |
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 { FieldProps } from 'formik' | |
import React from 'react' | |
import Select, { Option, ReactSelectProps } from 'react-select' | |
export const SelectField: React.SFC<ReactSelectProps & FieldProps> = ({ | |
options, | |
field, | |
form, | |
}) => ( | |
<Select |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Facebook DOM Traversal</title> | |
</head> | |
<body> | |
<div id="rootA"> | |
<div> |
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
'use strict'; | |
export class Facebook { | |
getScript() { | |
return new Promise((resolve) => { | |
if (window.FB) { | |
resolve(window.FB); | |
} | |
const id = 'facebook-jssdk'; |
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
"New Container Component": { | |
"prefix": "ncc", | |
"body": [ | |
"import { connect } from 'react-redux';", | |
"import ${1:name} from './${1:name}';", | |
"", | |
"const mapStateToProps = state => {", | |
" return {$2};", | |
"};", | |
"", |
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
{ | |
"keys": ["tab"], | |
"command": "expand_abbreviation_by_tab", | |
// put comma-separated syntax selectors for which | |
// you want to expandEmmet abbreviations into "operand" key | |
// instead of SCOPE_SELECTOR. | |
// Examples: source.js, text.html - source | |
"context": [ | |
{ |
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
# Fires up a web server on localhost:8000 | |
# | |
# Example: | |
# | |
# ~/workspace $ server | |
# Serving HTTP on 0.0.0.0 port 8000 ... | |
function server() { | |
local port="${1:-8000}" | |
open "http://localhost:${port}/" |
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
(function (window) { | |
var transitions = { | |
'transition': 'transitionend', | |
'WebkitTransition': 'webkitTransitionEnd', | |
'MozTransition': 'transitionend', | |
'OTransition': 'otransitionend' | |
}, | |
elem = document.createElement('div'); | |
for(var t in transitions){ |
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
authors: | |
hanzou: | |
name: Hanzou Hattori | |
display_name: Hanzou | |
gravatar: c66919cb194f96c696c1da0c47354a6a | |
email: hanzou@company.com | |
web: http://company.com | |
twitter: company | |
github: hhattori | |
jorgen: |