This file contains 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(factory) { | |
//factory是一个函数,下面的koExports就是他的参数 | |
// Support three module loading scenarios | |
if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') { | |
// [1] CommonJS/Node.js | |
// [1] 支持在module.exports.abc,或者直接exports.abc | |
var target = module['exports'] || exports; // module.exports is for Node.js |
This file contains 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
'use strict'; | |
module.exports = { | |
types: [ | |
{ | |
value: 'WIP', | |
name : '💪 WIP: Work in progress' | |
}, | |
{ |
This file contains 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
{ | |
"editor.fontFamily": "FiraCode-Retina", | |
"editor.fontLigatures": true, | |
"editor.fontSize": 18, | |
"editor.dragAndDrop": false, | |
"editor.minimap.renderCharacters": false, | |
"editor.roundedSelection": false, | |
"editor.quickSuggestions": { | |
"other": true, | |
"comments": true, |
This file contains 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
/*============= Easing =============*/ | |
var easing = { | |
easeInQuad: function(x, t, b, c, d) { | |
return c * (t /= d) * t + b; | |
}, | |
easeOutQuad: function(x, t, b, c, d) { | |
return -c * (t /= d) * (t - 2) + b; | |
}, | |
easeInOutQuad: function(x, t, b, c, d) { | |
if ((t /= d / 2) < 1) return c / 2 * t * t + b; |
This file contains 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 A extends React.PureComponent { | |
state = this.getInitialState(); | |
getInitialState() { | |
const { className } = this.props; | |
return { | |
className | |
}; | |
} |
This file contains 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
docker run --name dozzle -d --volume=/var/run/docker.sock:/var/run/docker.sock -p 4040:8080 amir20/dozzle:latest |
This file contains 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
/* istanbul ignore file */ | |
/* tslint:disable */ | |
/* eslint-disable */ | |
import { ApiError } from './ApiError'; | |
import type { ApiRequestOptions } from './ApiRequestOptions'; | |
import type { ApiResult } from './ApiResult'; | |
import { OpenAPI } from './OpenAPI'; | |
function isDefined<T>(value: T | null | undefined): value is Exclude<T, null | undefined> { | |
return value !== undefined && value !== null; |
This file contains 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
// xx | |
const view = new BrowserView() | |
win.setBrowserView(view) | |
view.setBounds({ x: 0, y: 0, width: 300, height: 300 }) | |
view.webContents.loadURL('https://electronjs.org') |
This file contains 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 const logger = (name, ...args) => { | |
if (process.env.NODE_ENV === 'development') { | |
// eslint-disable-next-line | |
console.groupCollapsed(`logger --> ${name}`); | |
// eslint-disable-next-line | |
console.log(...args); | |
// eslint-disable-next-line | |
console.groupEnd(); | |
} | |
}; |
This file contains 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
<section class="todoapp"> | |
<div> | |
<header class="header"> | |
<h1>todos</h1> | |
<input class="new-todo" placeholder="What needs to be done?" value="" /> | |
</header> | |
<section class="main"> | |
<input id="toggle-all" class="toggle-all" type="checkbox" /> | |
<label for="toggle-all"></label> | |
<ul class="todo-list"> |
NewerOlder