Skip to content

Instantly share code, notes, and snippets.

View hyrious's full-sized avatar
💤
lazy

hyrious hyrious

💤
lazy
View GitHub Profile
@hyrious
hyrious / when_did_i_star.rb
Last active June 10, 2023 20:15
When did I star that repo?
# "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
import { build } from "esbuild";
import { readFileSync } from "fs";
build({
entryPoints: ["main.js"],
bundle: true,
platform: "node",
format: "esm",
outfile: "bundle.js",
plugins: [
%YAML 1.2
---
# - https://www.sublimetext.com/docs/syntax.html
# - https://typst.app/docs/reference/syntax
name: Typst
scope: source.typ
version: 2
file_extensions:
- typ
@hyrious
hyrious / bilibili-no-adblock.user.css
Created January 24, 2023 04:26
bilibili no adblocks
/* ==UserStyle==
@name bilibili no adblocks tip
@namespace hyrious/bilibili-no-adblock
@version 1.0.0
@description hide adblock tips on bilibili
@author hyrious
==/UserStyle== */
@-moz-document domain("www.bilibili.com") {
.adblock-tips { display: none !important }
}
@hyrious
hyrious / sublime-doc-dark.user.css
Last active July 2, 2023 15:21
dark sublime text doc
/* ==UserStyle==
@name Dark Sublime Text Doc
@namespace sublime-doc.hyrious.me
@version 1.0.0
@description Please my eyes
@author hyrious
==/UserStyle== */
@-moz-document url-prefix("https://www.sublimetext.com/docs/") {
@media (prefers-color-scheme: dark) {
html {
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<link rel="stylesheet" href="https://unpkg.com/heti@0.9.3/umd/heti.min.css">
</head>
<body>
<button onclick="run()">Run Heti</button>
@hyrious
hyrious / run-svgo.sh
Created January 10, 2023 03:31
Run svgo on all svg files in a git commit
git show --pretty="" --name-only HEAD | rg .svg | xargs pnpm svgo
@hyrious
hyrious / phone.html
Created January 6, 2023 10:46
号码归属地
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
// ==UserScript==
// @name 自动填写输入框
// @namespace autoinput.miku.tools
// @match https://tools.miku.ac/*
// @grant none
// @version 0.1.1
// @author hyrious
// @description 在地址栏输入 ?input1;input2 就会自动为搜索到的输入框设置 value
// ==/UserScript==
onNuxtReady(() => ((inputs, searches) => searches.forEach((a, i) =>
@hyrious
hyrious / no-grayscale.user.js
Created December 2, 2022 03:01
Turn off full site grayscale.
// ==UserScript==
// @name 关掉灰阶效果
// @namespace no-grayscale.hyrious.me
// @match *://*/*
// @grant none
// @version 1.0
// @author hyrious
// @description 尝试一键消除全站 { filter: grayscale }
// ==/UserScript==
void function(){