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
#define NOMINMAX | |
#define WIN32_LEAN_AND_MEAN | |
#include <ShellScalingApi.h> | |
#include <Windows.h> | |
#include <cstdio> | |
auto main() -> int { | |
SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE); | |
EnumDisplayMonitors( | |
nullptr, nullptr, |
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
"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>; |
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
%YAML 1.2 | |
--- | |
# - https://www.sublimetext.com/docs/syntax.html | |
# - https://docs.moonbitlang.com/en/latest/language/introduction.html | |
# - https://github.com/moonbitlang/moonbit-docs/blob/main/next/_ext/lexer.py | |
file_extensions: | |
- mbt | |
first_line_match: |- |
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 sublime, sublime_plugin | |
import re | |
class GotoRegion(sublime_plugin.TextCommand): | |
def is_enabled(self): | |
name = self.view.file_name() | |
return name.endswith('.js') or name.endswith('.ts') | |
def run(self, edit): | |
regions = self.view.find_all('//#region (.+)') | |
if w := self.view.window(): |
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 GitHub Code Cursor Position | |
// @namespace caret.github.hyrious.me | |
// @match https://github.com/* | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @description Show current column on caret. | |
// @require https://cdn.jsdelivr.net/npm/[email protected]/selector-set.js | |
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/index.umd.js |
NewerOlder