Skip to content

Instantly share code, notes, and snippets.

View matsubo's full-sized avatar

Yuki Matsukura matsubo

View GitHub Profile
@matsubo
matsubo / gist:ac31be9578834db85e034ac54c0b433f
Created January 21, 2024 15:05
install nodejs oneliner on Ubuntu or Debian
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && apt-get install -y nodejs
@matsubo
matsubo / commit-msg
Created January 17, 2024 13:01 — forked from iberianpig/commit-msg
IssueID_xxxxなブランチ名の時に自動でコミットメッセージの先頭に[#IssueID]を付与するrubyスクリプト
#!/usr/bin/env ruby
message_file = ARGV[0]
message = File.read(message_file, :encoding => Encoding::UTF_8)
# remove prefix issue number like [#1234] from COMMIT_EDITMSG
message = message.sub(/^\[#[0-9A-Za-z_].*\]/, "")
# remove comment
message = message.gsub(/^#(?! ------------------------ >8 ------------------------).*\n|^\n/, "")
@matsubo
matsubo / autofill.js
Last active December 16, 2023 17:23
法人番号検索API サンプルコード
document.getElementById('s').addEventListener('keyup', async (e) => {
if (e.key !== 'Enter') return;
const s = e.target.value;
const corporateInfoUrl = `https://corporation.teraren.com/corporations.json?s=${s}`;
try {
const corporateResponse = await fetch(corporateInfoUrl);
const { items: [corporateData] } = await corporateResponse.json();
@matsubo
matsubo / Mutagen.md
Last active December 11, 2023 07:52
@matsubo
matsubo / applications.js
Created November 27, 2023 07:40
Disable wheel on <input type="number"> to prevent un-intended value change.
import { disableWheel } from './disable-wheel.js';
window.addEventListener('load', function () {
disableWheel('input[type="number"]')
}, false);
@matsubo
matsubo / gist:f8765683b75ab5098f99730ae6442bae
Created November 23, 2023 06:11
gistを更新しても草は生えますか?
gistを更新しても草は生えますか?
@matsubo
matsubo / README.md
Last active December 20, 2023 11:39
@matsubo
matsubo / privacy_policy.md
Last active July 27, 2023 01:30
terms of service.md

プライバシーポリシー

________(以下,「サイト管理者」といいます。)は,本ウェブサイト上で提供するサービス(以下,「本サービス」といいます。)における,利用者の個人情報の取扱いについて,以下のとおりプライバシーポリシー(以下,「本ポリシー」といいます。)を定めます。

第1条(個人情報)

「個人情報」とは,個人情報保護法にいう「個人情報」を指すものとし,生存する個人に関する情報であって,当該情報に含まれる氏名,生年月日,住所,電話番号,連絡先その他の記述等により特定の個人を識別できる情報及び容貌,指紋,声紋にかかるデータ,及び健康保険証の保険者番号などの当該情報単体から特定の個人を識別できる情報(個人識別情報)を指します。

第2条(個人情報の収集方法)

@matsubo
matsubo / bank code curl sample.md
Last active July 7, 2023 08:42
銀行コード
% curl -s "https://bank.teraren.com/banks/0001.json?$(random)" | jq
{
  "code": "0001",
  "kana": "ミズホ",
  "name": "みずほ",
  "roma": "mizuho",
  "hira": "みずほ",
  "normalize": {
    "name": "みずほ銀行",