$ gpg --list-secret-keys --keyid-format=long
sec rsa4096/0123456789ABCDEF 2020-12-22 [SC] [expired: 2021-12-22]
0123456789ABCDEF0123456789ABCDEF12345678
uid [ expired] hyrious <hyrious@outlook.com>
$ # ok, they key 0123456789ABCDEF has expired, let's edit it
$ gpg --edit-key 0123456789ABCDEF
gpg> expire
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 |
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
<textarea id="code" rows="15" cols="80">import {useState} from 'react' | |
import {Button} from '@mui/material' | |
export default function App() { | |
const [count, setCount] = useState(0) | |
return <> | |
<Button variant="outlined" onClick={() => setCount(c => c + 1)}> | |
Count: {count} | |
</Button> |
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 Shorten Commit URL | |
// @namespace short-commit.github.com | |
// @match https://github.com/**/commit/* | |
// @grant none | |
// @version 1.0 | |
// @author hyrious | |
// @description Replace shorter URL if abbrev commit hash exist | |
// ==/UserScript== | |
void function() { |
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
<!DOCTYPE html> | |
<title>Stroke Test</title> | |
<style> | |
* { box-sizing: border-box; } | |
body { margin: 0; } | |
.container { | |
position: absolute; | |
inset: 50px 100px; | |
border: 1px solid; |
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 | |
import sublime_plugin | |
import json | |
from collections import OrderedDict | |
# https://github.com/antfu/eslint-config/blob/main/src/configs/sort.ts | |
KeyOrder = [ | |
'publisher', | |
'name', | |
'displayName', |
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
// This file persists Loro doc to indexeddb | |
import type { Loro, LoroEvent } from 'loro-crdt' | |
import { Remitter, ReadonlyRemitter } from 'remitter' | |
import * as idb from 'lib0/indexeddb' | |
export interface PersistEventData { | |
synced: IPersistProvider | |
} | |
export interface IPersistProvider { |
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
$("dup", async () => { | |
if (fs.existsSync("pnpm-lock.yaml")) { | |
const { packages } = yaml.load(fs.readFileSync("pnpm-lock.yaml", "utf8")); | |
let last = ["", ""]; | |
let seen = new Set(); | |
const log = (s) => seen.has(s) || (seen.add(s), console.log(s)); | |
for (const path in packages) { | |
const i = path.lastIndexOf("@"); | |
const pkg = path.slice(1, i); | |
const ver = path.slice(i + 1); |
NewerOlder