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
[ | |
{ | |
"caption": "Cleanup Repo", | |
"command": "git", | |
"args": {"argv": ["gc"]} | |
}, | |
{ | |
"caption": "Sync main to origin/main", | |
"command": "git", | |
"args": {"argv": ["branch", "-f", "main", "origin/main"]} |
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
{ | |
"variables": { | |
"font_face": "更纱黑体 UI SC" | |
} | |
} |
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
/// <reference types="vite/client" /> | |
// The contents of index.html: | |
// <script src="./node_modules/source-map/dist/source-map.js"></script> | |
// <script type="module" src="/using-source-map-in-browser.ts"></script> | |
import * as esbuild from 'esbuild-wasm/esm/browser.js' | |
import wasmURL from 'esbuild-wasm/esbuild.wasm?url' | |
import sourceMapWasmURL from 'source-map/lib/mappings.wasm?url' |
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
require "json" | |
require "fileutils" | |
require "cgi" | |
include FileUtils::Verbose | |
folder = 'C:\Users\hyrious\OneDrive\Apps\Violentmonkey' # <-- change to your backup folder place | |
index_file = 'Violentmonkey' | |
target = File.join __dir__, 'ViolentmonkeyExport' | |
mkdir_p target |
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
#pragma comment(lib, "user32") | |
#pragma comment(lib, "gdi32") | |
#pragma comment(lib, "shcore") | |
#define NOMINMAX | |
#define WIN32_LEAN_AND_MEAN | |
#include <ShellScalingApi.h> | |
#include <Windows.h> | |
#include <cstdio> |
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
"overrides": { | |
"eslint": { | |
// Only loaded for `--mcp`. | |
"@modelcontextprotocol/sdk": "npm:noop-package", | |
"zod": "npm:noop-package" | |
} | |
} |
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 mixin(cls: Function, mod: Function) { | |
const proto = { | |
__proto__: Object.getPrototypeOf(cls.prototype) | |
} | |
Object.getOwnPropertyNames(mod.prototype).forEach(field => { | |
if (field == 'constructor') return; | |
proto[field] = mod.prototype[field] | |
}) | |
Object.setPrototypeOf(cls.prototype, proto) | |
return cls |
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
alias finalurl="curl -o /dev/null -sILw '%{url_effective}'" | |
# Example usage: | |
# finalurl b23.tv/ovUaDM9 | sed -e 's/?.*//' |
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 { createContext, use, useState } from 'react'; | |
import { createPortal } from 'react-dom'; | |
import { createRoot } from 'react-dom/client'; | |
const Context = createContext<string>('') | |
function Test() { | |
const theme = use(Context) | |
return <div>"{theme}"</div> |
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 { compute, isVal, setValue, subscribe, type ComputeGet, type ReadonlyVal } from 'value-enhancer'; | |
type Value<T> = T | ReadonlyVal<T>; | |
type ValueOrList<T> = Value<T> | ValueOrList<T>[]; | |
type ValueOrList2<T> = ValueOrList<T> | ValueOrList<ValueOrList<T>>; | |
type Element = HTMLElement | SVGElement; | |
type Attributes<T> = Partial<{ | |
[K in keyof T]: T[K] extends Function ? never : T[K] extends object ? Attributes<T[K]> : Value<number | T[K] | undefined | null>; | |
}>; | |
type Children = ValueOrList2<Element | string | ObserverNode | undefined>; |
NewerOlder