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
mode: rule | |
log-level: info | |
dns: | |
enable: true | |
ipv6: false | |
# 启动服务器,用于解析提供的 nameserver,只能用 IP | |
# default-nameserver: | |
# - 223.5.5.5 | |
# - 119.29.29.29 | |
enhanced-mode: fake-ip |
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 interface ConstructorOptions { | |
api: string; | |
key: string; | |
} | |
export default class JSONBin { | |
private api: string; | |
private key: string; | |
constructor(options: ConstructorOptions) { |
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 fromRecords<T>(items: T[], key: keyof T, value: keyof T) { | |
return Object.fromEntries(items.map(({ [key]: k, [value]: v }) => [k, v])) | |
} | |
const users = [ | |
{ id: 'id1', name: 'Alice', email: '[email protected]' }, | |
{ id: 'id2', name: 'Bob', email: '[email protected]' }, | |
] | |
const userMap = fromRecords(users, 'id', 'name') |
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
import React from 'react'; | |
export function makeStore({actions}) { | |
// Make a context for the store | |
const context = React.createContext(); | |
// Make a provider that takes an initialValue | |
const Provider = ({initialValue = {}, children}) => { | |
// Make a new state instance | |
const [state, setState] = React.useState(initialValue); |
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
*://blog.csdn.net/* |
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
{ | |
"workbench.startupEditor": "none", | |
"editor.fontSize": 13.5, | |
"editor.fontFamily": "Victor Mono", | |
"editor.fontLigatures": true, | |
"editor.lineHeight": 24, | |
"editor.tabSize": 2, | |
"git.confirmSync": false, | |
"editor.guides.bracketPairs": false, | |
"git.autofetch": 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
// 检测给定字符串是否正确嵌套 | |
// Determine whether a given string of parentheses (multiple types) is properly nested. | |
function solution(text) { | |
var openBrackets = ['(', '[', '<', '{']; | |
var closedBrackets = [')', ']', '>', '}']; | |
var requiredClosedBrackets = []; | |
var chars = text.split(''); | |
for (var i = 0; i < chars.length; i++) { |
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
## Disk Settings ## | |
dir = ${HOME}/Downloads | |
daemon = false | |
enable-mmap = true | |
disk-cache = 64M | |
file-allocation = none | |
## Download Settings ## | |
continue = true | |
split = 16 |
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
declare class Stringified<T> extends String { | |
private ___stringified: T | |
} | |
interface JSON { | |
stringify<T>( | |
value: T, | |
replacer?: (key: string, value: any) => any, | |
space?: string | number | |
): string & Stringified<T> |
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
<!DOCTYPE html> | |
<html lang="cn"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/xlsx.full.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jszip.min.js"></script> | |
<!-- <script src="https://cdn.jsdelivr.net/npm/[email protected]/preact/standalone.umd.min.js"></script> --> |
NewerOlder