Skip to content

Instantly share code, notes, and snippets.

View AWtnb's full-sized avatar
i love coffee

Akira Watanabe AWtnb

i love coffee
View GitHub Profile
@AWtnb
AWtnb / .inputrc
Created February 8, 2026 04:05
clink config
# Ctrl-Nで単語単位でサジェストを確定
"\C-n": clink-forward-bigword
@AWtnb
AWtnb / readme.md
Last active December 22, 2025 12:39
Obsidian weekly-note css snippet
@AWtnb
AWtnb / cocopy.md
Last active August 25, 2025 01:52
Cocopy custom functions

Custom functions for pokutuna/chrome-cocopy.

scrapbox

({title, url}) => `[${title.replace(/\s*[\[\]]\s*/g, ' ')} ${url}]`;

Rich text format (pastable on slack)

@AWtnb
AWtnb / dir.md
Created July 28, 2025 05:08
企画のディレクトリ構成について考える
.
├── .root
├── _legacy
├── _wiki
├── design_装幀
├── donation_献本
├── galley_ゲラ
│   ├── main_本文
│   │   ├── 0_layout_割付
@AWtnb
AWtnb / amazon-to-hanmoto.js
Created July 25, 2025 02:14
Amazonの商品ページからISBNで版元ドットコムに飛ぶ
// ==UserScript==
// @name Amazon to hanmono.com
// @namespace http://tampermonkey.net/
// @version 2025-07-25
// @description open hanmoto.com page by isbn
// @author AWtnb
// @match https://www.amazon.co.jp/*/dp/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=amazon.co.jp
// @grant none
// ==/UserScript==
@AWtnb
AWtnb / sieve.py
Last active June 27, 2025 13:03
skk dict chaos handler
import sys
from pathlib import Path
def main(bigger_dict_path, smaller_dict_path):
smaller_set = set(
Path(smaller_dict_path).read_text(encoding="utf-16-le").splitlines()
)
output_path = Path(bigger_dict_path).with_stem("sieved")
@AWtnb
AWtnb / additional.css
Created June 19, 2025 07:12
Obsidian css snippet
* {
font-family: "UDEV Gothic", "HackGen", "PlemolJP";
}
.inline-title {
color: #333;
font-style: normal !important;
font-weight: bold;
font-size: 2em !important;
}
@AWtnb
AWtnb / cmdlet.ps1
Last active February 10, 2025 04:15
PowerShellでUSBデバイスの安全な取り外し with fzf
function Get-EjectableDrive {
[OutputType([System.IO.DriveInfo])]
param()
return [System.IO.DriveInfo]::GetDrives() | Where-Object {$_.DriveType -eq [System.IO.DriveType]::Removable}
}
function Invoke-DriveEject {
try {
fzf.exe --version > $null
}
@AWtnb
AWtnb / minify.js
Created October 19, 2024 07:27
bookmarklet to open repository from github pages
javascript:(function(){const l=document.location;const h=l.host;if(h.endsWith(".github.io")){const u=h.split(".")[0];const p=l.pathname;const nu=new URL("https://github.com/");nu.pathname=u+p;window.open(nu.toString(),"_blank")}}())
@AWtnb
AWtnb / zen2han.bas
Created May 20, 2024 06:48
Word VBA 全角数字を半角に一括変換
Sub 全角数字を半角にする()
If Selection.Type = wdSelectionIP Then
MsgBox "範囲選択して下さい"
Exit Sub
End If
Dim i As Integer
Application.ScreenUpdating = False
For i = 0 To 9
With Selection.Find