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
/* | |
* NOTE: | |
* - The use of browser-specific styles (-moz-, -webkit-) should be avoided. | |
* If used, they may not render correctly for people reading the email in | |
* a different browser than the one from which the email was sent. | |
* - The use of state-dependent styles (like a:hover) don't work because they | |
* don't match at the time the styles are made explicit. (In email, styles | |
* must be explicitly applied to all elements -- stylesheets get stripped.) | |
*/ |
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 { get, post } = require("axios"); | |
const url = `https://sc.ftqq.com/SCU15511Ta62845f53fed1f23c365071e0e1bda035a029f383eba8.send`; | |
const getParams = (text, desp) => encodeURI(`?text=${text}&desp=${desp}`); | |
async function getBeijingStores() { | |
const res = await get( | |
"https://reserve-prime.apple.com/CN/zh_CN/reserve/iPhone/stores.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
{ | |
"definitions": { | |
"io.k8s.kubernetes.pkg.api.v1.NodeDaemonEndpoints": { | |
"description": "NodeDaemonEndpoints lists ports opened by daemons running on the Node.", | |
"properties": { | |
"kubeletEndpoint": { | |
"$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.DaemonEndpoint", | |
"description": "Endpoint on which Kubelet is listening." | |
} | |
}, |
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
{ | |
"oneOf": [ | |
{ | |
"$ref": "https://gist.githubusercontent.com/pengx17/0ce785e18739f3421c95ee7bf833e37f/raw/ac3783b7416196309eabb46c846748e6043c9060/_definitions.json#/definitions/io.k8s.kubernetes.pkg.apis.authorization.v1.NonResourceAttributes" | |
}, | |
{ | |
"$ref": "https://gist.githubusercontent.com/pengx17/0ce785e18739f3421c95ee7bf833e37f/raw/ac3783b7416196309eabb46c846748e6043c9060/_definitions.json#/definitions/com.github.openshift.origin.pkg.image.apis.image.v1.ImageStreamList" | |
}, | |
{ | |
"$ref": "https://gist.githubusercontent.com/pengx17/0ce785e18739f3421c95ee7bf833e37f/raw/ac3783b7416196309eabb46c846748e6043c9060/_definitions.json#/definitions/io.k8s.kubernetes.pkg.api.v1.AzureDiskVolumeSource" |
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 { request } from 'gaxios'; | |
import * as cheerio from 'cheerio'; | |
import { promises } from 'fs'; | |
const base = 'http://v.8s8s.com'; | |
async function getNameList(): Promise<[string, string][]> { | |
const page = await request<string>({ | |
url: base + '/qumingzi_5.php', |
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, { useMemo, useEffect } from 'react'; | |
type Func<Args extends any[], Return> = (...args: Args) => Return; | |
/** | |
* Wrap a hook and return a component | |
*/ | |
export function ripook<Args extends any[], Return>(hook: Func<Args, Return>) { | |
const RipookWrapper: React.FC<{ | |
params: Args; |
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
alert('hello world') |
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 input = `1,1,1,1,3,1,4,1,4,1,1,2,5,2,5,1,1,1,4,3,1,4,1,1,1,1,1,1,1,2,1,2,4,1,1,1,1,1,1,1,3,1,1,5,1,1,2,1,5,1,1,1,1,1,1,1,1,4,3,1,1,1,2,1,1,5,2,1,1,1,1,4,5,1,1,2,4,1,1,1,5,1,1,1,1,5,1,3,1,1,4,2,1,5,1,2,1,1,1,1,1,3,3,1,5,1,1,1,1,3,1,1,1,4,1,1,1,4,1,4,3,1,1,1,4,1,2,1,1,1,2,1,1,1,1,5,1,1,3,5,1,1,5,2,1,1,1,1,1,4,4,1,1,2,1,1,1,4,1,1,1,1,5,3,1,1,1,5,1,1,1,4,1,4,1,1,1,5,1,1,3,2,2,1,1,1,4,1,3,1,1,1,2,1,3,1,1,1,1,4,1,1,1,1,2,1,4,1,1,1,1,1,4,1,1,2,4,2,1,2,3,1,3,1,1,2,1,1,1,3,1,1,3,1,1,4,1,3,1,1,2,1,1,1,4,1,1,3,1,1,5,1,1,3,1,1,1,1,5,1,1,1,1,1,2,3,4,1,1,1,1,1,2,1,1,1,1,1,1,1,3,2,2,1,3,5,1,1,4,4,1,3,4,1,2,4,1,1,3,1`; | |
const cache = {}; | |
// a fish starts with 6 (8 - 2) | |
function countFish(remainingTime) { | |
if (cache[remainingTime]) { | |
return cache[remainingTime]; | |
} | |
let originalRemainingTime = remainingTime; |
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
function permutate(arr = []) { | |
let res = []; | |
if (arr.length === 1) { | |
return [arr]; | |
} | |
for (let i = 0; i < arr.length; i++) { | |
let c = arr[i]; | |
let rest = arr.slice(); | |
rest.splice(i, 1); |
OlderNewer