A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
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 * as React from 'react' | |
| type Args<F> = F extends (...args: infer A) => any ? A : never | |
| type Parser<T> = (data: any, prevData: T) => T | |
| interface AsyncState<T> { | |
| /** 是否加载中 */ | |
| loading: boolean | |
| /** 成功数据 */ |
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 * as React from 'react'; | |
| import { theme } from './theme'; | |
| import { ThemeProvider, createGlobalStyle } from './styled-components'; | |
| const GlobalStyle = createGlobalStyle` | |
| body { | |
| font-family: Times New Roman; | |
| } | |
| `; |
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
| { | |
| "rulesDirectory": [ | |
| "node_modules/codelyzer", | |
| "node_modules/rxjs-tslint" | |
| ], | |
| "extends": "tslint:latest", | |
| "rules": { | |
| "align": [ | |
| true, | |
| "parameters", |
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
| ls=dir /ONE $* | |
| cd=cd /d $* | |
| cnpm=npm $* --registry=https://registry.npm.taobao.org |
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
| /* | |
| (c) by Thomas Konings | |
| Random Name Generator for Javascript | |
| */ | |
| function capFirst(string) { | |
| return string.charAt(0).toUpperCase() + string.slice(1); | |
| } | |
| function getRandomInt(min, max) { |
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
| # first: | |
| lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
| sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
| # To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
| # go to /usr/local/lib and delete any node and node_modules | |
| cd /usr/local/lib | |
| sudo rm -rf node* |
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
| /*! | |
| * gulp | |
| * $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev | |
| */ | |
| // Load plugins | |
| var gulp = require('gulp'), | |
| sass = require('gulp-ruby-sass'), | |
| autoprefixer = require('gulp-autoprefixer'), | |
| cssnano = require('gulp-cssnano'), |