Skip to content

Instantly share code, notes, and snippets.

@shikishima
shikishima / user.js
Created February 21, 2024 08:43
Firefoxのuser.js
// userChrome.css有効化
user_pref('toolkit.legacyUserProfileCustomizations.stylesheets', true);
// ブラウザデバッガを有効
user_pref('devtools.chrome.enabled', true);
// リモートデバッガを有効
user_pref('devtools.debugger.remote-enabled', true);
// DLディレクトリ
user_pref('browser.download.dir', 'H:home\tmp');
// abount:configで警告を表示しない
user_pref('browser.aboutConfig.showWarning', false);
@shikishima
shikishima / corfu-init.el
Last active July 13, 2023 02:07
cape-dict not working on Windows 11
;; Gitのgrepがイカれててcape-dictが動かない
(when (and (eq system-type 'windows-nt)
(not (string-match "SCOOP" (executable-find "grep"))))
(shell-command "scoop install gow"))
@shikishima
shikishima / edge-other-profile.vbs
Last active December 5, 2023 09:53
MS Edgeでプロファイルディレクトリを指定かつプロファイルを指定してコマンドラインで開く
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshFso = WScript.CreateObject("Scripting.FileSystemObject")
EDGE_EXE = WshShell.ExpandEnvironmentStrings("%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe")
SHARE_DIR = WshShell.ExpandEnvironmentStrings("%HOME%\opt\share\")
EDGE_PROFILE_DIR = SHARE_DIR + "edge\profile\"
If Not WshFso.FolderExists(EDGE_PROFILE_DIR) Then
WshShell.Run("%ComSpec% /c md " + EDGE_PROFILE_DIR)
End If
@shikishima
shikishima / wsl.bat
Created December 16, 2021 10:34
cmdからWSLのリダイレクト処理をワンライナーで呼ぶ
REM 上手くいく
wsl sh -c "echo 'nameserver 8.8.8.8' > /etc/resolv.conf"
REM これは失敗する
wsl echo 'nameserver 8.8.8.8' > /etc/resolv.conf
@shikishima
shikishima / edge.vbs
Created December 8, 2021 11:01
Edgeのプロファイルを指定して起動するVBSファイル
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshFso = WScript.CreateObject("Scripting.FileSystemObject")
EDGE_EXE = WshShell.ExpandEnvironmentStrings("%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe")
SHARE_DIR = WshShell.ExpandEnvironmentStrings("%HOME%\opt\share\")
EDGE_PROFILE_DIR = SHARE_DIR + "edge\profile\"
If Not WshFso.FolderExists(EDGE_PROFILE_DIR) Then
WshShell.Run("%ComSpec% /c md " + EDGE_PROFILE_DIR)
@shikishima
shikishima / romantable.txt
Last active January 15, 2025 02:16
Google日本語入力のAZIK入力にGoogle日本語入力由来の記号入力を足す
~ ~
, 、
. 。
/ ・
: ー
; っ
[ 「
] 」
a あ
ba ば
@shikishima
shikishima / orakuni.md
Created October 30, 2020 05:52
Windows上でキー入力をキャプチャするソフトのメモ
@shikishima
shikishima / emacs-lisp.el
Created October 28, 2020 04:58
tramp-modeでサーバー上のファイルでformat-allをかけた時、prettierの設定ファイルを使う
(advice-add 'format-all--buffer-easy :around #'tt/format-all/prettier-config)
(defun tt/format-all/prettier-config (orig executable &rest args)
;; tramp-modeでprettier使用時にローカルのconfigを読み込ませる
(when (and (string-match "prettier" executable) (tramp-tramp-file-p (buffer-file-name)))
(setq args (append (list "--config" (tt/nice-path "~/.prettierrc")) args))
(apply orig executable args)
))
@shikishima
shikishima / emacs-conf.el
Last active October 12, 2020 06:27
バージョン管理下においてもEmacsのバックアップファイルを作成する
;;; backup file
(setq make-backup-files t)
(setq backup-directory-alist
(cons (cons "\\.*$" (tt/nice-path (concat user-emacs-directory "backup/"))) ; ディレクトリ
backup-directory-alist))
(setq version-control nil) ; 世代管理はしない
(setq vc-make-backup-files t) ; gitなどのバージョン管理下においてもバックアップは取る https://www.366service.com/jp/qa/a0bf9bef5bc6d7e31b505b32e84acae6
;; 特定のメジャーモードではバックアップを取らない
(defconst tt/backup/no-backup-modes '(fundamental-mode git-commit-mode))
(dolist (mode
@shikishima
shikishima / docker-windows.md
Last active September 9, 2020 02:22
Docker をWindows10 Homeで動かすメモ

Dockerのインストール

  • スタートメニューを開きinsiderと入力

  • 『Windows の機能の有効化または無効化』の『Linux 用 Windows サブシステム』にチェックを入れる

  • Windows Insider Programでベータチャネル以上を選択

  • Windowsアップデートをし再起動