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
// Get changelog of a package on GitHub. | |
import cp from "child_process"; | |
var name = process.argv[2]; | |
// https://github.com/dword-design/package-name-regex | |
var re = /^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/; | |
if (!(typeof name == "string" && re.test(name))) { | |
console.log("usage: node changelog.mjs <package name>"); | |
process.exit(1); | |
} |
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
/* ==UserStyle== | |
@name AGE.TV 微调 | |
@namespace tune.age.tv | |
@version 1.0.0 | |
@description 我不喜欢,改回去 | |
@author EE | |
==/UserStyle== */ | |
@-moz-document domain("www.agemys.org") { | |
header.sticky-top { | |
position: static; |
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 Slack Auto Redirect | |
// @namespace redirect.slack.com | |
// @match https://*.slack.com/* | |
// @grant none | |
// @version 1.0 | |
// @author hyrious | |
// @description Fuck. | |
// ==/UserScript== | |
(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
// ==UserScript== | |
// @name CasePolice | |
// @namespace case-police.hyrious.me | |
// @include * | |
// @grant GM_xmlhttpRequest | |
// @version 1.0 | |
// @author hyrious | |
// @description Automatically correct your cases in <input> and <textarea> | |
// ==/UserScript== | |
void async 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
// ==UserScript== | |
// @name github.blog dark mode | |
// @namespace github.blog/dark | |
// @match https://github.blog/* | |
// @grant none | |
// @version 1.0 | |
// @author hyrious | |
// @description _(:3」∠)_ | |
// ==/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
// ==UserScript== | |
// @name 视频独立窗口(含弹幕) | |
// @namespace bili-video-window-hyrious.me | |
// @match https://www.bilibili.com/video/* | |
// @grant none | |
// @version 1.1 | |
// @author hyrious | |
// @description 通过快捷键打开一个小窗口,可以独立显示视频 | |
// ==/UserScript== | |
;(() => { |
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/ohmyzsh/ohmyzsh/blob/-/plugins/git/git.plugin.zsh | |
def git_current_branch [] { | |
git symbolic-ref --quiet HEAD | str replace 'refs/heads/' '' | str trim | |
} | |
alias gl = git pull | |
alias gfa = git fetch --all --prune | |
alias gsw = git switch | |
alias gswc = git switch --create |
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 fs_ from "fs"; | |
import http from "http"; | |
const fs = fs_.promises; | |
let manga = []; | |
function handler(req, res) { | |
const url = new URL(req.url, "http://" + req.headers.host); |
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
# "when did i star {REPO}?" | |
# 1. Make sure you have installed `gh` and have `gh auth login`, so that I don't ask you for the token | |
# 2. Fetch https://docs.github.com/en/rest/activity/starring for all starred history | |
# 3. Run 2 until we found the repo | |
unless repo = ARGV[0] | |
puts "usage: ruby #$0 <repo>" | |
exit 0 | |
end |
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 { build } from "esbuild"; | |
import { readFileSync } from "fs"; | |
build({ | |
entryPoints: ["main.js"], | |
bundle: true, | |
platform: "node", | |
format: "esm", | |
outfile: "bundle.js", | |
plugins: [ |