Instantly share code, notes, and snippets.

View app-nav-config-category.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://gist.githubusercontent.com/pengx17/bba5e7d5b25fcdd143673cb0df9c0b93/raw/ad8bec658dcc44904cf908acc5a525148f7ad4ec/app-nav-config-category.json",
"type": "object",
"title": "Rubick App Nav Config",
"required": [
"user"
],
"properties": {
"user": {
View gist:6b74522c545105a97bac2661c1a62b84
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"
);
View debounce-promise.js
// Debounced promise:
// Like lodash.debounce, but multiple calls to a debounced function
// will return the same promise so that they will be notified when the debounced function returns
//
// In case the deboucned value is a promise, the last promise value shall be returned.
function debounceFn(fn, timeout) {
let timer = undefined;
let resPromise = undefined;
let resolver = undefined;
let rejector = undefined;
View markdown_here.css
/*
* 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.)
*/