Skip to content

Instantly share code, notes, and snippets.

@toriwasa
toriwasa / bing_to_google.user.js
Last active February 4, 2024 11:27
Edgeのスタート画面やアドレスバーから検索したときにBing検索からGoogle検索に飛ばすユーザースクリプト
// ==UserScript==
// @name bing to google
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Edgeのスタート画面やアドレスバーから検索したときにBing検索からGoogle検索に飛ばすユーザースクリプト
// @author toriwasa
// @match https://www.bing.com/search*
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant none
// @downloadURL https://gist.github.com/toriwasa/8d8d03e2b19e0149b3195d85b305b2b3/raw/dd8a727084baacb5491b47f903eb3ef53640b5c5/bing_to_google.user.js
@toriwasa
toriwasa / copy_assets.ts
Created September 13, 2022 13:38
Node.js + Typescriptのみで再帰コピーを実行するスクリプト
// 引数を元にコピー元ディレクトリからコピー先ディレクトリに再帰的にファイルをコピーする
// ビルド対象でない静的ファイルをビルド先ディレクトリに単純にコピーするためのスクリプト
// npm script で呼び出すことで利用する
// Usage: ts-node ./copy_assets.ts ./srcDirPath ./destDirPath
import {
readdirSync,
lstatSync,
existsSync,
mkdirSync,
@toriwasa
toriwasa / keymap.txt
Last active December 4, 2020 18:08
GoogleIMEのキー設定
status key command
Composition Backspace Backspace
Conversion Backspace Cancel
Precomposition Backspace Revert
Composition Ctrl a MoveCursorToBeginning
Conversion Ctrl a SegmentFocusFirst
Composition Ctrl Backspace Backspace
Conversion Ctrl Backspace Cancel
Precomposition Ctrl Backspace Undo
Composition Ctrl d MoveCursorRight
@toriwasa
toriwasa / batch_design_policy.md
Created January 16, 2019 09:31
バッチ処理を設計する際の方針

バッチ処理の設計・改善のためのチェック項目

  • バッチ処理を新しく作るときの設計や、既存のバッチ運用を引き継いで改修を行う際の方針
  • 面倒なので運用時に考えること・手数を減らしたい

データのライフサイクル

  • バッチ処理結果データの保持期限・削除基準は決まっているか?
  • 保持期限を過ぎたデータを削除する処理は実装されているか?

ログ出力

  • 処理失敗時に事態を把握するため、バッチ処理を行う対象データの範囲、バッチ処理の開始時刻・終了時刻をログに出力しているか
@toriwasa
toriwasa / arcadia-local-viewer.user.js
Last active November 17, 2018 14:37
Arcadiaをローカルに落として見たい人向けにリンク書き換えるユーザースクリプト書いたやつ
// ==UserScript==
// @name Arcadia local Viewer
// @namespace http://tampermonkey.net/
// @version 0.41
// @description Replace URL of Arcadia, to read in local file.
// @author toriwasa
// @match file:///D:/test/*.html
// @grant none
// ==/UserScript==
@toriwasa
toriwasa / convert.py
Created November 9, 2017 03:40
Markdown形式で記述したテスト仕様書をExcelに変換するツール
# -*- coding: utf-8 -*-
import re
from pathlib import PurePath
from typing import Any, Dict # NOQA
import fire
import pandas as pd
from openpyxl.styles import Alignment, Border, Font, PatternFill, Side
from openpyxl.styles.borders import BORDER_THIN
@toriwasa
toriwasa / AutoHotKey.ahk
Last active March 3, 2024 06:14
手の移動距離を減らすためのAutoHotKeyスクリプト
;------------------------------------------------------------------------------
; 前提:
; 日本語, 英語キーボードどちらでも使用可能
; 英語キーボードの場合、変換・無変換キーが存在するUS配列として扱えるAX配列を利用する
; 参考:
; https://www.atmarkit.co.jp/ait/articles/0001/26/news001.html
; Change Key使用:
; 日本語キーボードの場合
; Caps Lock -> Ctrl
; 英語キーボードの場合