# exclude files should be full path to the files if PATH_TO_SOURCE_FILES is not the root path of exclude files
$ zip -re PATH_TO_TARGET PATH_TO_SOURCE_FILES -x "node_modules/*" ".git/*"
# example
$ zip -re "$HOME/git/demo.zip" . -x "node_modules/*" ".git/*" "test/*" ".husky/*"
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
// ==UserScript== | |
// @name org-protocol | |
// @namespace https://gist.github.com/Spike-Leung/19986df42333b6419b2eadaa73526d7b | |
// @version 0.0 | |
// @description Use Alt + l for Org: capture and use Alt + h for Org: capture-html | |
// @author Spike-Leung | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== |
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
REGEDIT4 | |
[HKEY_CLASSES_ROOT\org-protocol] | |
@="URL:Org Protocol" | |
"URL Protocol"="" | |
[HKEY_CLASSES_ROOT\org-protocol\shell] | |
[HKEY_CLASSES_ROOT\org-protocol\shell\open] | |
[HKEY_CLASSES_ROOT\org-protocol\shell\open\command] | |
@="\"C:\\Windows\\System32\\wsl.exe\" /snap/bin/emacsclient \"%1\"" |
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
// see: https://www.zhangxinxu.com/wordpress/2022/04/js-font-face-load/ | |
// see: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace | |
import fontUrl from 'fonts/SourceHanSansSC-Regular.otf' | |
function check() { | |
try { | |
const font = new FontFace('SourceHanSansSC-Regular', `url(${fontUrl})`) | |
await font.load() | |
// load success | |
} catch (e) { |
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
/** | |
* input.json looks like: | |
* | |
* { "name": "name" } | |
*/ | |
// @deno-types="https://cdn.sheetjs.com/xlsx-0.19.2/package/types/index.d.ts" | |
import * as XLSX from 'https://cdn.sheetjs.com/xlsx-0.19.2/package/xlsx.mjs'; | |
import { readFileSync } from "https://deno.land/[email protected]/node/fs.ts"; | |
// 读取 JSON 文件 | |
const data = readFileSync('./input.json', 'utf-8') |