Skip to content

Instantly share code, notes, and snippets.

View aiya000's full-sized avatar
🐶
Inu

aiya000 aiya000

🐶
Inu
View GitHub Profile
@aiya000
aiya000 / github-pr-page-comments-conversation-full-width.css
Last active July 2, 2026 04:02
GitHub PR Page Comments (Conversation) Full Width
/* `| Conversation | Commits Checks | Files changed |`より下を持っているコンテナ */
#diff-comparison-viewer-container div[class*="prc-PageLayout-PageLayoutContent-"] {
display: block !important;
overflow-x: auto !important;
}
/* Issue/PRのComments(Conversation) */
#diff-comparison-viewer-container div[class*="prc-PageLayout-ContentWrapper-"][class*="Conversations-module__content__"] {
margin-top: 60px; /* TODO: これ入れないとIssue(PR)作成者のヘッダーがIssue(PR)の本文開始と重なるので、暫定対処。この値は重ならない値のうちおおよそ最小のもの。後でちゃんと対応する */
width: 90vw !important;
#!/usr/bin/env -S deno run --allow-read --allow-write
/**
* fix-neovim-shada.ts
*
* ## What this script does
*
* Fixes corrupted Neovim shada files by removing problematic newline characters (0x0a, 0x0d).
* These newline characters can appear in command history or search history entries,
* causing plugins like cmdpalette.nvim to crash with errors like:
@aiya000
aiya000 / Test.lua
Created October 24, 2025 16:42
How to create freezed table in Lua
--- readonly() {{{
---Creates a readonly table
---@generic K, V
---@param x table<K, V>
---@return table<K, V> --But readonly
local function readonly(x)
return setmetatable({}, {
__index = x,
__newindex = function(_, key, value)
local neoscroll = require('neoscroll')
-- ... ここにその他設定(setup()など)
local keymaps_opts = {
duration = 200,
easing = 'quadratic',
}
vim.keymap.set('n', 'gg', function()
#!/bin/bash
function usage() {
echo "Usage:"
echo " $0 <nas_local_mount_point> <nas_remote_photoframe_dir> <nas_remote_ip> [<nas_remote_username> <nas_remote_password> [nas_remote_user_dir]]"
echo 'Example:'
echo " $0 /home/pi/LS210D6E9 /Pictures/Family 192.168.1.20"
echo ' # Start photoframe with pictures in /home/pi/LS210D6E9/Pictures/Family'
echo ' # When NAS directory is not mounted yet, this fails.'
echo
@aiya000
aiya000 / .luarc.json
Last active July 31, 2025 17:07
Type definition file when writing init.lua or Neovim plugin in lua-language-server
{
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
"Lua.runtime.version": "LuaJIT",
"Lua.diagnostics.globals": [
"vim"
],
"Lua.workspace.userThirdParty": [
"${workspaceFolder}/types"
],
"Lua.workspace.library": [
@aiya000
aiya000 / vimrc.lua
Created July 21, 2025 14:32
関数型プログラミングっぽい僕の.vim/autoload/vimrc.vimを、Claude Codeが.luaに変換してくれたやつ
-- Main vimrc module (replacement for autoload/vimrc.vim)
local list_util = require('utils.list')
local msg_util = require('utils.message')
local M = {}
-- Allows to reuse `self`.
-- Params:
-- self: A
@aiya000
aiya000 / override-css.user.js
Last active April 14, 2025 14:10
Override a specified DOM element CSS of a specified URL (Disable all existing styles of elements matching a CSS selector and apply new styles)
// ==UserScript==
// @name Override CSS Styles
// @namespace https://gist.github.com/aiya000/0514d3b7994d9c13bf8a75075ddea82c
// @version 0.1
// @description Override CSS Styles (Disable all existing styles of elements matching a CSS selector and apply new styles)
// @author aiya000
// @match *://*/*
// @grant none
// ==/UserScript==
@aiya000
aiya000 / hide-techfeed-count-numbers.css
Last active April 28, 2025 12:21
Hides TechFeed https://techfeed.io/categories/all count numbers. favorites counts, hot points, bookmark counts, and more.
/* ==UserStyle==
@name Hide TechFeed count numbers
@namespace github.com/aiya000
@version 1.0.0
@description As the name suggests
@author aiya000
==/UserStyle== */
@-moz-document url-prefix("http") {
/**
@aiya000
aiya000 / remove-twitter-follower-count.js
Last active April 13, 2025 22:27
Deprecated. ~~A tampermonky script, to solves the problem of the 'Control Panel for Twitter' extension not being able to hide the number of followers of a Twitter account.~~
// ==UserScript==
// @name Remove Twitter Follower Count
// @namespace https://gist.github.com/aiya000/9c5a16c3a96f0b14576923128fe261b4
// @version 2025-04-09
// @description Remove Twitter(X)'s follower count at profile. This solves the problem of the 'Control Panel for Twitter' extension not being able to hide the number of followers of a Twitter account.
// @author aiya000
// @match https://x.com/*
// @match https://twitter.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none