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 Chance = require('chance'); | |
const chance = new Chance(); | |
const left = [ | |
"admiring", | |
"adoring", | |
"affectionate", | |
"agitated", | |
"amazing", | |
"angry", |
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
" returns 1 if: | |
" eslintConfig exists in package.json and eslint is a devDependency | |
" .eslintrc exists and eslint is a devDependency in package.json | |
" returns 0 if | |
" eslint is a devDependency but no eslintConfig or .eslintrc is found, | |
" this is because eslint does not turn on any validation rules by default | |
" eslint is not a devDependency | |
function! HasEslint() | |
"a: indicates that the variable is argument scoped | |
"l: specifies that a variable is local to a function |
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
[info] - should compare two xml nodes and check that they are the same *** FAILED *** | |
Neq(List(UnequalElem(music,List(UnequalElem(artist,List(UnequalElem(album,List(UnequalElem(description,List(AbsentNode( | |
[info] The King of Limbs is the eighth studio album by English rock band Radiohead, produced by Nigel Godrich. It was self-released on 18 February 2011 as a download in MP3 and WAV formats, followed by physical CD and 12" vinyl releases on 28 March, a wider digital release via AWAL, and a special "newspaper" edition on 9 May 2011. The physical editions were released through the band's Ticker Tape imprint on XL in the United Kingdom, TBD in the United States, and Hostess Entertainment in Japan. | |
[info] ), RedundantNode(The King of Limbs is the eighth studio album by English rock band Radiohead, produced by Nigel Godrich. It was self-released on 18 February 2011 as a download in MP3 and WAV formats, followed by physical CD and 12" vinyl releases on 28 March, a w |
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
<music> | |
<artist name="Radiohead"> | |
<album title="The King of Limbs"> | |
<song title="Bloom" length="5:15"/><song title="Morning Mr Magpie" length="4:41"/><song title="Little by Little" length="4:27"/><song title="Feral" length="3:13"/><song title="Lotus Flower" length="5:01"/><song title="Codex" length="4:47"/><song title="Give Up the Ghost" length="4:50"/><song title="Separator" length="5:20"/> | |
<description link="http://en.wikipedia.org/wiki/The_King_of_Limbs"> | |
The King of Limbs is the eighth studio album by English rock band Radiohead, produced by Nigel Godrich. It was self-released on 18 February 2011 as a download in MP3 and WAV formats, followed by physical CD and 12" vinyl releases on 28 March, a wider digital release via AWAL, and a special "newspaper" edition on 9 May 2011. The physical editions were released through the band's Ticker Tape imprint on XL in the United Kingdom, TBD in the United States, and Hostess Entertainment in Japan. | |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [{ | |
"Effect": "Allow", | |
"Action": "s3:*", | |
"Resource": "*" | |
}] | |
} |
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 hmr = { | |
entry: [FILE_PATHS.reactHotLoader, FILE_PATHS.hmrEntry, | |
FILE_PATHS.entry], | |
plugins: [ | |
new HmrPlugin(), | |
new NoErrorsPlugin(), | |
new EnvironmentPlugin({ | |
NODE_ENV: 'development' | |
}) |
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 UserListItem from './UserListItem'; | |
class App extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
users: [ | |
{ id: 1, name: 'Cory' }, | |
{ id: 2, name: 'Meg' } |
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 sprite from 'svg-sprite-loader/runtime/sprite.build'; | |
const spriteContent = sprite.stringify(); | |
// Your express app goes here | |
// Good luck with the rest of the server rendered configuration | |
res.send(` | |
<!DOCTYPE html> | |
<head> | |
<!-- add all your stylesheets and other stuff here, use the styled-components plugin, that is very powerful --> |
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 path = require('path'); | |
const pascalCase = require('pascal-case'); | |
const { stringifyRequest } = require('loader-utils'); | |
const { stringifySymbol, stringify } = require('../../lib/utils'); | |
module.exports = function runtimeGenerator({ symbol, config, context, loaderContext }) { | |
const { spriteModule, symbolModule, runtimeOptions } = config; | |
const compilerContext = loaderContext._compiler.context; | |
const iconModulePath = path.resolve(compilerContext, runtimeOptions.iconModule); |
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 Icon (props) { | |
// support transform in browsers that dont provide support for transforms using CSS | |
const {id, viewBox} = props | |
// using the default value for preserveAspectRatio | |
/* | |
*/ | |
return ( | |
<svg |
NewerOlder