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
{ | |
"className": { | |
"prefix": ["cn", "tw"], | |
"body": "className=\"$0\"" | |
}, | |
"className conditional": { | |
"prefix": "cnn", | |
"body": "className={cx([\"$0\"])}" | |
}, | |
"React Component": { |
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
13.125.0.0/16 | |
13.56.0.0/14 | |
18.130.0.0/16 | |
18.184.0.0/15 | |
18.194.0.0/15 | |
18.196.0.0/15 | |
34.192.0.0/10 | |
34.240.0.0/13 | |
34.248.0.0/13 | |
35.156.0.0/14 |
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 lodash = require('lodash') | |
const wtf = require('wtf') | |
const print = ({ result, display }) => console.log(`${result} ≈ ${display}`) | |
wtf.sync({ lodash }, | |
['apple', 'p'], true, | |
['apple', 'x'], false | |
).map(print) |
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
console.logg = (...args) => { | |
args.forEach(arg => { | |
if (arg !== null && typeof arg === 'object' && !Array.isArray(arg)) { | |
Object.keys(arg).forEach(propName => { | |
console.log(`\u001b[7m${propName}:\u001b[27m`) | |
console.log(arg[propName]) | |
}) | |
} else { | |
console.log(arg) | |
} |
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 () { | |
"use strict" | |
const a = () => '' + b() | |
const b = () => c() | |
const c = () => d() | |
const d = () => new Error().stack | |
console.log(a()) | |
})() |
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 doSomething = () => {} | |
const S = (...args) => { | |
const [ Component, css, defaultProps ] = | |
typeof args[0] === 'string' ? args : [ 'div', ...args ] | |
return (props) => <Component css={css} {...defaultProps} {...props}/> | |
} | |
const Label = S('label', { display: 'block' }) | |
const Block = S({ margin: '1rem 0' }) |
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 zipObject from 'lodash/zipObject' | |
import memoize from 'lodash/memoize' | |
const loadModules = memoize((modules) => { | |
// prevent node style export | |
const exports = undefined | |
const module = undefined | |
const resultModules = [] | |
const resultNames = [] |
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 } from 'react' | |
import { connect } from 'react-redux' | |
import { find, propEq } from 'ramda' | |
import Header from './header' | |
import { requestCurrent as requestCurrentUser } from 'users/users_actions' | |
@connect( | |
state => ({ currentUser: find(propEq('current', 1), state.users) }), | |
{ requestCurrentUser } | |
) |
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 createAction = (type, payloadReducer = (i => i)) => { | |
const creator = (...args) => { | |
const payload = payloadReducer(...args); | |
return payload ? { type, payload } : { type }; | |
}; | |
creator.toString = () => type; | |
return creator; | |
} |