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
| diff --git a/.gitignore b/.gitignore | |
| index 82701fe..9b10e17 100644 | |
| --- a/.gitignore | |
| +++ b/.gitignore | |
| @@ -1,19 +1,8 @@ | |
| -# See https://help.github.com/articles/ignoring-files for more about ignoring files. | |
| -# | |
| -# If you find yourself ignoring temporary files generated by your text editor | |
| -# or operating system, you probably want to add a global ignore instead: | |
| -# git config --global core.excludesfile '~/.gitignore_global' |
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
| diff --git a/.gitignore b/.gitignore | |
| index 48fb168..16ffc48 100644 | |
| --- a/.gitignore | |
| +++ b/.gitignore | |
| @@ -1,17 +1,6 @@ | |
| -# See https://help.github.com/articles/ignoring-files for more about ignoring files. | |
| -# | |
| -# If you find yourself ignoring temporary files generated by your text editor | |
| -# or operating system, you probably want to add a global ignore instead: | |
| -# git config --global core.excludesfile '~/.gitignore_global' |
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 (..) | |
| -- MODEL | |
| type alias Model = | |
| {} | |
| -- UPDATE |
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 (..) | |
| -- MODEL | |
| type alias Model = | |
| {} | |
| -- UPDATE |
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
| require 'benchmark' | |
| n = 5_000_000 | |
| Benchmark.bmbm do |x| | |
| x.report('String#match') do | |
| n.times do | |
| 'metadata:foo=bar'.match(/metadata:/) | |
| end | |
| end |
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
| irb(main):001:0> str = 'This is my STRING!' | |
| => "This is my STRING!" | |
| irb(main):002:0> def str.-@ | |
| irb(main):003:1* downcase | |
| irb(main):004:1> end | |
| => :-@ | |
| irb(main):005:0> p str | |
| "This is my STRING!" | |
| => "This is my STRING!" | |
| irb(main):006:0> p -str |
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 { Component } from "React"; | |
| export const Enhance = ComposedComponent => class extends Component { | |
| constructor() { | |
| super() | |
| this.state = { data: null }; | |
| } | |
| componentDidMount() { | |
| this.setState({ data: 'Hello' }); | |
| } |
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
| beforeAll(() => { | |
| console.error = error => ( | |
| throw new Error(error); | |
| ); | |
| }); |
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
| diff --git a/src/components/Article.js b/src/components/Article.js | |
| new file mode 100644 | |
| index 0000000..fef5d8a | |
| --- /dev/null | |
| +++ b/src/components/Article.js | |
| @@ -0,0 +1,55 @@ | |
| +import React, { PropTypes, Component } from 'react' | |
| + | |
| +// stateful component (w/ state) | |
| +class Article extends Component { |
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
| class User { | |
| // ... | |
| handleChange = e => { | |
| } | |
| } |