Skip to content

Instantly share code, notes, and snippets.

@mebiusbox
mebiusbox / typos.toml
Last active September 1, 2024 07:22
typos
# https://github.com/crate-ci/typos/blob/master/docs/reference.md
[files]
extend-exclude = [
"*.patch" # Automatically generated files that should not be manually modified.
]
[default]
extend-ignore-re = [
# spellchecker: disable-line, disable-next-line, disable, enable
# "(?Rm)^.*(#|//|/\\*)\\s*spellchecker:\\s*disable-line$",
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
@mebiusbox
mebiusbox / README.md
Last active September 1, 2024 07:27
gistコマンドを自作してテンプレートファイルを管理する

Gistコマンドを自作してテンプレートファイルを管理する

※ここでの「テンプレートファイル」とはコンフィグファイルなど、各プロジェクトとよく使うファイルのことを指します.

目的 (Goal)

  • PowerShellを使って、Gistに登録しているファイルをクローンし、差分を表示したり、パッチを適用する機能を持つgistコマンドを実装する

動機 (Motivation)

# 文字数の制限 (default: 80)
printWidth: 119
# 末尾のコロンを削除するかどうか. ["all", "es5", "none"]
trailingComma: "all"
# タブを使うかどうか (.editorconfig)
# useTabs: true
# タブサイズ (.editorconfig)
@mebiusbox
mebiusbox / .editorconfig
Last active December 23, 2025 04:59
editorconfig
# https://editorconfig.org/
root = true
[*]
charset = utf-8
indent_size = 4
indent_style = space
tab_width = 4
end_of_line = crlf
insert_final_newline = true
@mebiusbox
mebiusbox / README.md
Last active August 28, 2024 08:31
Espanso

Espanso

Espansoは文字入力支援ソフトです. ここには、Espanso用の追加設定ファイルを置いておきます.

Espansoの設定ファイル base.ymlimports に指定したりコピペで使えます.

imports:
  - symbols.yml
@mebiusbox
mebiusbox / README.md
Last active December 23, 2025 05:04
mdbook

mdBook 0.4.52

Math

Mathjax がサポートされている.

[output.html]
mathjax-support = true
@mebiusbox
mebiusbox / enen_Cambridge.js
Last active August 1, 2022 09:08
Cambridge Dictionary for Online Dictionary Helper
/* global api */
class enen_Cambridge {
constructor(options) {
this.options = options;
this.maxexample = 2;
this.word = '';
}
async displayName() {
// let locale = await api.locale();
@mebiusbox
mebiusbox / winodw.rs
Last active January 7, 2021 07:27
Use minifb to display the generated image of type image::RgbImage in a window
// image = "*"
// minifb = "0.19.1"
use crate::{
IMAGE_HEIGHT, IMAGE_WIDTH,
};
use minifb::{Key, Window, WindowOptions};
use image::{RgbImage};
pub fn draw_in_window(mut pixels: RgbImage) -> std::io::Result<()>
{
@mebiusbox
mebiusbox / book.py
Last active December 31, 2019 14:22
Get book information by ISBN10 or ISBN13 with google books API
import sys
import urllib.request
import urllib.parse
import json
import objectpath
import pyperclip
import re
# API Endpoint
API_URL = "https://www.googleapis.com/books/v1/"