$ find . -name \"node_modules\" -type d -prune -exec rm -rf '{}' \;
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 a = { | |
| a: 'a' | |
| }; | |
| const obj = { | |
| getThis: () => this, | |
| getThis2 () { | |
| return this; | |
| } | |
| }; |
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 styled from 'styled-components' | |
| export const Wrapper = styled.div<{ paddingLeft?: number }>` | |
| padding: 28px 20px 0 | |
| ${(props) => (props?.paddingLeft === 0 ? 0 : props?.paddingLeft || 32)}px; | |
| min-height: 500px; | |
| box-shadow: 0px 2px 4px 0px rgba(110, 122, 125, 0.3); | |
| border-radius: 2px; | |
| ` |
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
| // 在线 demo: https://repl.it/@phobal/forAwaitOf#index.js | |
| let i = 60; | |
| const items = Array(i) | |
| .fill() | |
| .map((_, i) => (i + 1) * 1000); | |
| function somethingAsync(time) { | |
| return delay(time).then(() => Promise.resolve(i--)); |
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
| # cd ~/.zshrc 添加如下配置 | |
| # 终端使用科学上网配置 | |
| # 开启,这里的端口号根据系统上 SS 软件的端口号为准 | |
| alias ss='export all_proxy=socks5://127.0.0.1:1086' | |
| # 关闭 | |
| alias unss='unset all_proxy' | |
| # source .zshrc | |
| # 需要使用的时候执行 ss |
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
| { | |
| // Use IntelliSense to learn about possible links. | |
| // Type `rule` to quick insert rule. | |
| // 输入 rule 来快速插入规则 | |
| // For more information, visit: https://github.com/yize/xswitch | |
| "proxy": [ | |
| // gitlab IP 代理 | |
| [ | |
| "http://172.16.17.29", | |
| "http://172.16.11.30:3001" |
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
| { | |
| "compilerOptions": { | |
| /* 基本选项 */ | |
| "target": "es5", // 指定 ECMAScript 目标版本: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'("ESNext"表示最新的ES语法,包括还处在stage X阶段) | |
| "module": "commonjs", // 指定使用模块: 'commonjs', 'amd', 'system', 'umd' or 'es2015' | |
| "lib": [], // 指定要包含在编译中的库文件 | |
| "allowJs": true, // 允许编译 javascript 文件 | |
| "checkJs": true, // 报告 javascript 文件中的错误 | |
| "jsx": "preserve", // 指定 jsx 代码的生成: 'preserve', 'react-native', or 'react' | |
| "declaration": true, // 生成相应的 '.d.ts' 文件 |
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
| { | |
| "type": "FeatureCollection", | |
| "name": "55-geojson", | |
| "crs": { | |
| "type": "name", | |
| "properties": { | |
| "name": "urn:ogc:def:crs:OGC:1.3:CRS84" | |
| } | |
| }, | |
| "features": [ |
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 elements = { | |
| name: 'phobal', | |
| dd: null, | |
| age: 18, | |
| sex: undefined, | |
| }; | |
| let params = [] | |
| Object.keys(elements).forEach((key) => { | |
| if (elements[key]) { | |
| params.push(`${key}=${elements[key]}`) |
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/bash | |
| date 0102030405 | |
| # open /Applications/Sketch.app | |
| open /Applications/Sketch.app | |
| # open ~/Downloads/Sketch.app | |
| ntpdate -u time.apple.com |
NewerOlder