Skip to content

Instantly share code, notes, and snippets.

View eniehack's full-sized avatar
🛌
zzz...

Nakaya eniehack

🛌
zzz...
  • Japan
View GitHub Profile
@eniehack
eniehack / mstdndeckquote.user.js
Last active May 26, 2024 17:54
[W.I.P.] Quote toot button for Mastodon deck UI
// SPDX-License-Identifier: MIT
// ==UserScript==
// @name Mastodonに引用ボタンを追加する
// @namespace http://www.eniehack.net/~eniehack/works/firefox-userscripts
// @version 0.1.1
// @description MastodonのDeck UIにtootを引用するためのURLコピーボタンをboostボタンの隣に追加します。
// @author eniehack
// @license MIT
// @match https://example.com/*
// @grant none
@eniehack
eniehack / booklog-jp_paperbook_search.user.js
Created July 8, 2024 07:55
ブクログ検索機能のジャンルのデフォルトを「紙の本」にするuserscript
// ==UserScript==
// @name booklogの検索でジャンルのデフォルトを紙の本にするくん
// @name:ja booklogの検索でジャンルのデフォルトを紙の本にするくん
// @namespace https://github.com/eniehack
// @match *://booklog.jp/*
// @grant none
// @version 0.1.0
// @author eniehack
// @description ブクログの検索機能はジャンルが選べますが、デフォルトでは「本」となっており、電子書籍と紙の本が一緒くたにされて検索されます。このスクリプトはデフォルトを「紙の本」にすることで電子書籍を使わない人にとって検索機能を使いやすくします。
// ==/UserScript==
@eniehack
eniehack / mstdn_above_v4-3-0_deck_quote.user.js
Last active October 23, 2024 04:38
Mastodon v4.3.0に伴うdeck UI の破壊的変更に https://gist.github.com/eniehack/59bc3e55170c8869b9fbffbdeaf29ad1 が対応できなくなったのでここに対応版を置きます。
// SPDX-License-Identifier: MIT
// ==UserScript==
// @name Mastodonに引用ボタンを追加する
// @name:en Add button to copy toot's url
// @name:ja Mastodonに引用ボタンを追加する
// @namespace http://www.eniehack.net/~eniehack/works/firefox-userscripts
// @version 0.3.0
// @description:en Add button to copy toot's url for quote toot on Mastodon's deck UI
// @description:ja MastodonのDeck UIにtootを引用するためのURLコピーボタンをboostボタンの隣に追加します。
// @author eniehack
@eniehack
eniehack / vi-coop.ahk
Last active March 30, 2025 14:11
VSCodeとWindows Terminalで入力している場合にのみ、Escキーを押したときの挙動を「無変換キーを押しESCを押す」動作に書き換えるAutoHotKey script。*nixにおけるuimのvi協調モードを再現したもの
if WinActive("ahk_exe Code.exe") or WinActive("ahk_exe WindowsTerminal.exe") {
$Esc::{ ; https://ahkscript.github.io/ja/docs/v2/lib/A_MaxHotkeysPerInterval.htm
Send "{vk1Dsc07B}" ; courvusskkオフコマンド(無変換)
Send "{Esc}" ; 本来のESCキー機能
Return
}
}
@eniehack
eniehack / glance.json
Created July 2, 2025 14:21
a JSON file for installing glance via scoop
{
"version": "0.8.4",
"description": "A self-hosted dashboard that puts all your feeds in one place.",
"homepage": "https://github.com/glanceapp/glance/",
"license": "AGPL-3.0",
"architecture": {
"64bit": {
"url": "https://github.com/glanceapp/glance/releases/download/v0.8.4/glance-windows-amd64.zip",
"sha256": "6eec1559ec566ead0e1d128c3a1a1a5c166a93a5f3d4de053984b4ae91f8a1de"
}
@eniehack
eniehack / tdiary-puma.rb
Created July 25, 2025 12:53
tdiaryをpumaで動かすためのスクリプト
# https://transitive.info/2018/08/21/onamae-vps-tdiary-nginx-puma/ を参考にtdiaryをpumaで動かすためのスクリプト。
# usage: puma -C puma.rb
workers 1
threads 2, 5
preload_app!
RUNTIME_DIR = ENV['XDG_RUNTIME_DIR'] || ENV['XDG_STATE_HOME']
bind "tcp://127.0.0.1:3000"
pidfile File.join(RUNTIME_DIR, 'puma_tdiary.pid')