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 type { ChildProcessWithoutNullStreams } from 'node:child_process'; | |
| const LengthPrefix = 'Content-Length: '; | |
| /// Simple language server client over JSON-RPC over stdio. | |
| export class LanguageClient { | |
| readonly process: ChildProcessWithoutNullStreams; | |
| private readonly _messageListeners: Set<(msg: unknown) => void> = new Set(); | |
| constructor(proc: ChildProcessWithoutNullStreams) { | |
| this.process = proc; |
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 * as vscode from 'vscode'; | |
| import redent from 'redent'; | |
| export function activate(context: vscode.ExtensionContext) { | |
| vscode.commands.registerCommand('selfhost.pasteWithIndent', async () => { | |
| const text = await vscode.env.clipboard.readText() | |
| if (!text) return; | |
| const editor = vscode.window.activeTextEditor | |
| if (editor) { |
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
| #define _CRT_SECURE_NO_WARNINGS | |
| #include <Windows.h> | |
| #include <stdio.h> | |
| #define BUFFER_SIZE 4096 | |
| int main(int argc, char *argv[]) { | |
| HANDLE hDir; | |
| DWORD bytesReturned; | |
| char buffer[BUFFER_SIZE]; |
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
| // Chrome - NW.js | |
| [ | |
| "navigation", | |
| "event", | |
| "onbeforexrselect", | |
| "onbeforeinput", | |
| "onbeforematch", | |
| "onbeforetoggle", | |
| "oncommand", | |
| "oncontentvisibilityautostatechange", |
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
| [ | |
| { "keys": ["super+c"], "command": "copy_diff", "context": [{ "key": "selector", "operand": "source.diff", "operator": "equal", "match_all": true } ] } | |
| ] |
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 { Plugin } from 'esbuild' | |
| import { default as Postcss } from 'postcss' | |
| import { default as PostcssModulesPlugin } from 'postcss-modules' | |
| import { compile, Options } from 'sass' | |
| export type CSSModulesOptions = Parameters<typeof PostcssModulesPlugin>[0] | |
| export interface CSSOptions { | |
| /// https://github.com/css-modules/postcss-modules | |
| modules?: CSSModulesOptions |
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
| [ | |
| { | |
| "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 |
NewerOlder