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
| ( | |
| (name,msg) => console.log(name,msg) | |
| )("dragon","hello,bird"); | |
| ( | |
| name => console.log(name) | |
| )("dragon"); | |
| let cat = { | |
| name:"tom", |
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
| git remote add origin https://github.com/once-work/oncework.git |
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
| git branch |
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 express = require('express') | |
| const path = require('path') | |
| const port = process.env.PORT || 8080 | |
| const app = express() | |
| // serve static assets normally | |
| app.use(express.static(__dirname + '/public')) | |
| // handle every other route with index.html, which will contain | |
| // a script tag to your application's JavaScript file(s). |
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
| // FIXME:因为在ComponentsLet中引入了所需的组件,所以不会再单独打包出独立的组件.若工程进一步增加,有必要整理代码 | |
| const root_Welcome = { | |
| path: '/Welcome', | |
| getComponent(nextState, cb) { | |
| require.ensure([], (require) => { | |
| cb(null, require('App/Components/Core/Welcome/WelcomeCpt').default) | |
| }, 'Welcome') | |
| } | |
| }; |
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
| #!/bin/sh | |
| echo $ONCEWORK_CLIPBOARD |
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
| git checkout %c% |
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 fetch from 'isomorphic-fetch'; | |
| // usage : const { status, data, error } = yield fetcher('/api/url'); | |
| export default function fetcher(url, options = {}) { | |
| return new Promise((resolve) => { | |
| fetch(url, Object.assign({}, { | |
| credentials: 'same-origin', | |
| headers: { | |
| Accept: 'application/json', | |
| 'Content-Type': 'application/json', |
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 _ from 'lodash' | |
| // eslint-disable-next-line no-undef | |
| class URLChangeEvent extends HashChangeEvent { | |
| get [Symbol.toStringTag] () { | |
| return 'URLChangeEvent' | |
| } | |
| } | |
| let urlCache = window.location.href |
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 representing a Trie data structure */ | |
| export default class Trie { | |
| /** | |
| * Creates a Trie | |
| * @return {Object} Trie | |
| */ | |
| constructor() { | |
| this.words = 0; | |
| this.prefixes = 0; |
OlderNewer