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
| export default function delay(ms) { | |
| return new Promise(resolve => { | |
| setTimeout(resolve, ms) | |
| }) | |
| } |
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
| <!DOCTYPE html> | |
| <html lang="{{ app()->getLocale() }}"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <!-- CSRF Token --> | |
| <meta name="csrf-token" content="{{ csrf_token() }}"> |
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
| txt |
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 Jimp = require('jimp') | |
| const path = require('path') | |
| const glob = require('./utils/glob') | |
| const optim = 300 | |
| async function main() { | |
| const files = await glob(path.resolve(__dirname, 'imgsrc/*')) | |
| files.forEach(async file => { |
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, {Children, cloneElement} from 'react' | |
| import T from 'prop-types' | |
| /** | |
| * Delay component from mounting until promise is resolved. | |
| */ | |
| class Resolver extends React.Component { | |
| state = { | |
| resolved: false, | |
| data: null |
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, {cloneElement} from 'react' | |
| /** | |
| * Make it easier to apply HOC to a component | |
| * without having to assign it to a variable | |
| */ | |
| class Compose extends React.Component { | |
| applied = this.props.hoc(this.props.component) | |
| render() { |
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' | |
| import history from '@/history' | |
| import make from './make' | |
| export default { | |
| /** | |
| * Only guests can enter this page | |
| */ | |
| guest: make((props) => { | |
| if (props.auth.data == null) { |
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
| <?php | |
| class Auth { | |
| /** | |
| * Our unique session key | |
| */ | |
| protected $key = '__MY_APP_AUTH__'; | |
| /** | |
| * PDO Instance |
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
| <template> | |
| <div :ref="(el) => this.el = el"></div> | |
| </template> |
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
| <template> | |
| <autocomplete> | |
| <input slot-scope="props" ref="props.inputRef" @change="props.change" :value="props.value"></input> | |
| </autocomplete> | |
| </template> |