Skip to content

Instantly share code, notes, and snippets.

@kui
kui / a.md
Last active August 27, 2023 05:38
Windows で各種リソースのログを取る
@kui
kui / a.bash
Last active August 6, 2021 10:48
List Pull Requests with your terminal between two commits/tags/branches
git clone git@github.com:microsoft/vscode.git
cd vscode
# CommitID/Tag/Branch
BASE=1.58.0
HEAD=1.59.0
## With Rest API and jq
# This will fail if too many commits to put these as querystring. In this case, it uses `-n 10`.
FORMAT='* [#\(.number)](\(.url)) \(.title)'
@kui
kui / garden-cloche-recipes.md
Last active January 19, 2021 06:23
Immersive Engineering メモ帳

Garden Cloche についての参考資料

Farmenter(1) は、Farmenter をフル稼働させ続けるのに必要な Cloche 台数。 80 tick で 1 個必要。

骨粉/tick は成果物すべてコンポスターに突っ込んだ時の 1 tick あたりの骨粉期待値。参考資料 https://minecraft.gamepedia.com/Composter#Composting

@kui
kui / a.kt
Created March 16, 2020 09:34
Treat timestamp with spring-data-r2dbc in non-UTC timezone
val connectionFactory = ConnectionFactories.get("r2dbc:mysql://root@127.0.0.1:3306/test")
// Wrapper to initialize each connections
val connectionFactory2 = object : ConnectionFactory {
override fun getMetadata(): ConnectionFactoryMetadata = connectionFactory.metadata
override fun create(): Publisher<out Connection> =
connectionFactory
.create()
.toMono()
.flatMap { connection ->
@kui
kui / _visualize_drone_steps.md
Last active June 21, 2021 10:36
Generate graph of drone steps using "depends_on"
@kui
kui / a.kt
Created October 11, 2019 07:40
val sql = """
INSERT INTO `person` (`birth`, `name`) "
VALUES (?, ?name)
"""
connection.createStatement(sql)
.bind(0, LocalDateTime.of(2019, 6, 25, 12, 12, 12))
.bind("name", "Some one")
.returnGeneratedValues("generated_id")
.execute() // return a Publisher include two Results.
@kui
kui / a.bash
Last active October 4, 2019 17:54
List pull requests
git clone https://github.com/github/hub.git
cd hub
git log --grep="^Merge pull request #[0-9]* from .*/.*" --pretty=format:"%B" \
| sed -nr "/^Merge pull request /{N;N;s/^Merge pull request (#[0-9]+) from .*\\n\\n/\1 /p}"
@kui
kui / a.md
Last active December 6, 2018 17:35

OffscreenCanvas では filter の指定に url(...) が使えない。

// Reference filters (e.g. 'url()') are not expected to work in Workers

https://wiki.whatwg.org/wiki/OffscreenCanvas から引用。

とのことだけれど、Google Chrome 70.0.3538.110 では worker ではなくメインスレッドでも使えなかった。

現状の回避策としては旧来通り、DOM に追加しない Canvas を使うことになりそう。

@kui
kui / README.md
Last active November 13, 2018 13:08
I DO NOT want to be a Morlock at 7 Days to Die α16.4

In your terminal:

$ patch -p1 < auto-miner.patch

And you might need to edit some duplicated IDs.

@kui
kui / tuners-chardev.yml
Last active March 25, 2018 03:04
2018-03-24 録画環境構築ログ

基本はこれ: http://blog.lwlv.net/archives/1010

最初に

mirakurun/chinachu を管理する pm2 の起動に紐づくアカウント作成。

Chinachuの実行ユーザー作成(既存のユーザーにする場合は不要)