Skip to content

Instantly share code, notes, and snippets.

View korosuke613's full-sized avatar
😇
Dakarayo!!

Futa HIRAKOBA korosuke613

😇
Dakarayo!!
View GitHub Profile
@korosuke613
korosuke613 / gptcommit_example.md
Last active January 30, 2023 04:23
gptcommit example

Input

Result of git diff.

❯ git diff
diff --git a/_posts/2023/02-09.md b/_posts/2023/02-09.md
index ff85672..7852684 100644
--- a/_posts/2023/02-09.md
+++ b/_posts/2023/02-09.md
@@ -106,6 +106,28 @@ excerpt: ''
@korosuke613
korosuke613 / prepare-commit-msg
Created January 30, 2023 04:11
Use gptcommit in a specific repository
#!/bin/sh
# Define an array of allowed directories
directories=("/path/hoge" "/path/foo")
# Get the current directory
current_dir=$(pwd)
# Check if current directory is in the list of allowed directories
if [[ "${directories[@]}" =~ "${current_dir}" ]]; then
@korosuke613
korosuke613 / renovate.log.json
Created January 13, 2023 05:22
Renovate dry-run log for korosuke613/homepage-2nd
DEBUG: Using RE2 as regex engine
DEBUG: Parsing configs
DEBUG: Checking for config file in /home/runner/work/homepage-2nd/homepage-2nd/renovate.json5
WARN: cli config dryRun property has been changed to full
DEBUG: File config
"config": {
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
":label(renovate)",
Diagrams for AWS IAM Roles Anyware
自信はない
@korosuke613
korosuke613 / buildkit
Last active October 22, 2021 10:27
Docker Desktop 無しで Docker を使う with lima on mac(https://korosuke613.hatenablog.com/entry/2021/09/18/docker-on-lima)
❯ pwd
/Users/korosuke613/ghq/github.com/korosuke613/playground/docker/here-docment
❯ DOCKER_BUILDKIT=1 docker build .
[+] Building 1.5s (10/10) FINISHED
=> [internal] load build definition from Dockerfile 0.4s
=> => transferring dockerfile: 37B 0.0s
=> [internal] load .dockerignore 0.4s
=> => transferring context: 2B 0.0s
=> resolve image config for docker.io/docker/dockerfile:1.3-labs 0.8s
@korosuke613
korosuke613 / test-tarao-oss-contributions_2016-01-01_2021-06-30.md
Last active June 27, 2021 11:35
tarao/oss-contributionsを試してみた(2016-01-01〜2021-06-30)

Contributions

Issues 176
Contributors1
Repositories27
Commits4,348
PRs 484
Reviews169
@korosuke613
korosuke613 / .pre-commit-config.yaml
Last active September 10, 2020 15:28
auto-insert-co-author
- repo: git://github.com/korosuke613/auto-insert-co-author-githook
rev: v1.0.1
hooks:
- id: insert-co-author
stages: [prepare-commit-msg]
@korosuke613
korosuke613 / gen_transate_txt.sh
Last active November 2, 2017 08:58
PDFを翻訳用テキストに変換する
#!/bin/bash
if [ $# -ne 1 ]; then
echo "指定された引数は$#個です。" 1>&2
echo "実行するには1個の引数が必要です。" 1>&2
exit 1
fi
# 作業用ディレクトリの作成・移動
mkdir __work
@korosuke613
korosuke613 / example_SpeedControl.cpp
Last active September 8, 2017 11:08
SpeedControlクラスの使用例
/**
* example_SpeedControl.cpp
* このプログラムはSpeedControlクラスを使う時に参考にできる使用例です。
*
* 【コンパイル・実行の仕方】
* g++-7 -w ../src/Pid.cpp ../src/SpeedControl.cpp example_SpeedControl.cpp -I../include
* ./a.out
*/
#include <iostream>
@korosuke613
korosuke613 / exphantom.py
Last active January 11, 2018 13:28
[Python3] サーバ上でウェブページのスクリーンショットを撮って、さらにそれをクロップする ref: https://qiita.com/Shitimi_613/items/254730d6dff96f6459ca
from PIL import Image
from selenium import webdriver
class ScreenShot:
def __init__(self, file_name_: str = "screenshot.png"):
"""
:type file_name_: str
"""
self._filename = file_name_