- https://hackernoon.com/how-we-started-sharing-components-as-a-team-d863657afaca
- https://material-ui-next.com/
- https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0
- https://medium.com/@baphemot/whats-new-in-react-16-3-d2c9b7b6193b
- facebook/react#7942 (comment)
- https://www.reddit.com/r/reactjs/comments/80ws5i/8_react_conditional_rendering_methods_ternary/
- https://realm.io/blog/introducing-realm-react-native/
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 Maybe = function(val) { | |
| this.__value = val instanceof Maybe ? val.__value : val | |
| } | |
| Maybe.from = function(val) { | |
| return new Maybe(val) | |
| } | |
| Maybe.none = function() { | |
| return new Maybe() |
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' | |
| class MyComponent extends React.Component { | |
| state = {} | |
| componentWillMount() {} | |
| componentDidMount() {} | |
| componentWillUnmount() | |
| componentWillReceiveProps(nextProps) {} |
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
| function getScopes(root) { | |
| var scopes = [] | |
| function traverse(scope) { | |
| scopes.push(scope) | |
| if (scope.$$nextSibling) | |
| traverse(scope.$$nextSibling) | |
| if (scope.$$childHead) | |
| traverse(scope.$$childHead) | |
| } | |
| traverse(root) |
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
| // ---------------------------------------------------- | |
| // p6 Object | |
| // ---------------------------------------------------- | |
| window.p6 = { | |
| running: false, | |
| ratio: 1, | |
| size: { | |
| w: 100, | |
| h: 100 | |
| }, |
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
| paperShadow(level = 1) | |
| if level == 1 | |
| box-shadow 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24) | |
| else if level == 2 | |
| box-shadow 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23) | |
| else if level == 3 | |
| box-shadow 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23) | |
| else if level == 4 | |
| box-shadow 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22) | |
| else if level == 5 |
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
Show hidden characters
| { | |
| "folders": [ | |
| { | |
| "folder_exclude_patterns": [ | |
| "bootstrap", | |
| "storage", | |
| "tests", | |
| "vendor", | |
| "database/factories", | |
| "resources/assets", |
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
| source ~/.git-prompt.sh | |
| GIT_PS1_SHOWCOLORHINTS=true | |
| PROMPT_COMMAND='__git_ps1 "\n\[$(tput setaf 6)\]\u \[$(tput setaf 3)\]\w\[$(tput sgr0)\]" "\[$(tput sgr0)\]\n> "' |
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 gulp = require('gulp') | |
| var minify = require('gulp-clean-css') | |
| var autoprefix = require('gulp-autoprefixer') | |
| var rename = require('gulp-rename') | |
| var stylus = require('gulp-stylus') | |
| var sass = require('gulp-sass') | |
| var plumber = require('gulp-plumber') | |
| var notify = require('gulp-notify') | |
| var gulpif = require('gulp-if') | |
| var path = require('path') |
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
| function avg(a) { | |
| return a.reduce((s, n) => n = s + n) / a.length | |
| } |