Skip to content

Instantly share code, notes, and snippets.

View abekoh's full-sized avatar

Kotaro Abe abekoh

View GitHub Profile
@abekoh
abekoh / go.mod
Last active July 8, 2023 02:41
moq / gomock をモック・スタブとして利用したGoのテストコードの比較
module abekoh.dev/gomocking
go 1.20
require (
github.com/golang/mock v1.6.0
github.com/matryer/moq v0.3.2
)
require (
@abekoh
abekoh / bookmarklet
Created October 26, 2022 14:00
Shrink URL of amazon.co.jp
javascript:(async()=>{const url=window.location.href;const pattern=/(https?:\/\/www\.amazon\.co\.jp\/)(.*?\/)?(dp\/[0-9]+).*/;const match=url.match(pattern);if(!match){alert("Invalid URL");}const shrinkedUrl=`${match[1]}${match[3]}`;try{await navigator.clipboard.writeText(shrinkedUrl);alert(`Copied:${shrinkedUrl}`);}catch{alert("Copy failed");}})();
@abekoh
abekoh / listnode.rs
Created May 7, 2022 01:42
[Leetcode] ListNode constructor for Rust
// Definition for singly-linked list.
// #[derive(PartialEq, Eq, Clone, Debug)]
// pub struct ListNode {
// pub val: i32,
// pub next: Option<Box<ListNode>>
// }
//
// impl ListNode {
// #[inline]
// fn new(val: i32) -> Self {
@abekoh
abekoh / settings.json
Last active April 30, 2022 03:56
VSCode backup 2022/04/30
{
"files.autoSave": "afterDelay",
"editor.fontFamily": "'Hack Nerd Font Mono','Ricty Diminished', Consolas, 'Courier New', monospace",
"editor.fontSize": 16,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
@abekoh
abekoh / 2021-10-27_現場から学ぶシステム設計:座談会.md
Created October 27, 2021 10:04
2021-10-27_現場から学ぶシステム設計:座談会
@abekoh
abekoh / agile.md
Last active January 27, 2022 08:39
どうであればアジャイルといえるのか
  • 「開発者もマネージャーも、(アジャイルにまつわる)プラクティスを正しく使うためには、その根本にある原則を理解しなければいけない」
    • 『レガシーコードからの脱却』P.242
  • 「自分のやり方が『アジャイルの道』に沿っているかどうかの自信がなくなったら、悩んでないでこう自問すればいい。
    ①毎週、価値ある成果を届けられているか?
    ②たゆまぬ改善のための努力を惜しまず続けているか?
    この2つの問への答えが『イエス』なら、君はアジャイルだ。」
    • 『アジャイルサムライ』P.287
  • 「『アジャイル開発』は、(手続きの進め方ではなく)チーム全体に対してメンタリングを行い開発出力を向上させる方法論」
    「アジャイルという言葉は(中略)『チームが環境に適応して、不確実性を最も効率よく削減できている状態』のことです。これは、自己組織化とも呼ばれます。」
  • 『エンジニアリング組織論への招待』P.131,175
@abekoh
abekoh / fix_cr.sh
Created July 17, 2021 02:29
WSL2で改行コードエラーでシェル失敗する場合、一気にフォーマットを治すコマンド
#!/bin/bash
fd -IH ".*" | xargs dos2unix