This file contains 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/selector-set@1.1.5/selector-set.js | |
// @require https://cdn.jsdelivr.net/npm/selector-observer@2.1.6/dist/index.umd.js |
This file contains 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
"""matplotlib.use('module://matplotlib_custom'), remember to add this file to PYTHONPATH""" | |
from matplotlib.backend_bases import Gcf | |
from matplotlib.backends.backend_agg import FigureCanvasAgg | |
FigureCanvas = FigureCanvasAgg | |
def show(*args, **kwargs): | |
var = globals().get('custom') | |
if var: |
This file contains 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
// https://github.com/evanw/esbuild/blob/main/internal/helpers/dataurl.go | |
const CharCode = { | |
Tab: 9, | |
LineFeed: 10, | |
CarriageReturn: 13, | |
Space: 32, | |
Hash: 35, | |
PercentSign: 37, | |
} |
This file contains 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
node -p 'var s=fs.statfsSync(".");s.bsize*s.bavail' | pretty-bytes |
This file contains 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 {parser} from '@lezer/javascript' | |
export function format(input: string) { | |
let tree = parser.parse(input) | |
let spaceAfter = (s: string) => s + ' ' | |
let spaceBefore = (s: string) => ' ' + s | |
let spaceAround = (s: string) => ' ' + s + ' ' | |
let spec = { |
This file contains 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 Translate Date | |
// @name:zh-CN 翻译日期到中文格式 | |
// @namespace translate-date.hyrious.me | |
// @match *://*/* | |
// @exclude *://*.bilibili.com/video/* | |
// @grant none | |
// @version 1.0 | |
// @author hyrious | |
// @description May 25 -> 3月25日 |
This file contains 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: https://github.com/SukkaW/react-compiler-webpack | |
import fs from 'node:fs' | |
import babel from '@babel/core' | |
import BabelPluginReactCompiler from 'babel-plugin-react-compiler' | |
/** @returns {import('esbuild').Plugin} */ | |
export function reactCompiler(options = {}) { | |
const filter = options.filter || /\.[jt]sx$/ | |
const reactCompilerConfig = options.reactCompilerConfig || {} |
This file contains 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 | |
have_a_rest = False | |
class FixCjkCommaListener(sublime_plugin.TextChangeListener): | |
def on_text_changed(self, changes): | |
global have_a_rest | |
if len(changes) != 1 or have_a_rest: return | |
c = changes[0] | |
if c.str != ',': return |
This file contains 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://lezer.codemirror.net/docs/guide/#writing-a-grammar | |
# - https://github.com/lezer-parser/generator/blob/main/src/parse.ts | |
file_extensions: | |
- grammar | |
name: Lezer |
This file contains 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
c246: RPGXP MAP (2142 bytes) | |
| Z\b<0><0><0x4>\b[\ao:\rRPG::Map<0x10>:\t@bgmo:<0x13>RPG::AudioFile\b:\f@volumeii:\n@name"<0>:\v@pitchii:<0x10>@tileset_idi<0x6>:\f@events{<0>:\t@bgso;\a\b;\biU;\t"<0>;\nii:<0x12>@autoplay_bgmF:\n@datau:\nTable<0x2><0x1c>\a<0x3><0><0><0><0x14><0><0><0><0xf><0><0><0><0x3><0><0><0><0x84><0x3><0><0><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x80><0x1><0x |
NewerOlder