Skip to content

Instantly share code, notes, and snippets.

@kui
kui / Blueprint Code
Last active November 6, 2024 14:27
物流ネットワークの要求に応じて組立機のレシピを変更するやつ
0eNrVWltP29gW/iuV3+bIGRHCXeo8nfd56VupokBMsRrsjOPQQRVSbKdtINzbHgSBcikkQFrSninlUi7/ZTZOwtP8hbPW2rZzIRRCmY6OVIHZttdee12+9a3lPhP6InEpqsmKLvQ8E+R+VYkJPQ+fCTH5sRKK4JoSGpKEHkFT+9SoqunCqCjISlj6Xejxj4oNHgzFYtJQX0RWHvuGQv2DsiL5AlUvtY4+EgVJ0WVdlvhW9MdIUIkP9UkaSBVdSaiMHlJ0X7861CcrIV3VBFGIqjF4V1VwS1Sipb3z53ZRGBF6fIFuuISt4EVdUyPBPmkwNCzDW/BoTOrHt2K117C9exhRGJAjuqTVrzrK6FpIiaEBfH1SRAc9fouHIqA33FJUbQhMgPsORUMa6dkj3KeFOBqWDOWe35M4EIrpvrsS2+aJlZWYpME5bi+r3ZMVUcGLgyFYDvu+X25H7dG/X2Bn5dCaqvgeSyHN93RQkiK3F9nliYzKUalZOY+qHQ1/QSxGI6ERSQuGpVi/Jkd54Ap24bT8aY0Zu6W9ZCmfLm6vMHOdWe+ZucGM/PnJEjPHmJFhxgozkngL1q0XzFo9P0iUs7lepfK4OWenXjBjlhlZeJWZKWa8o+vCxddkeey/zFpgVp5ZKVUjKX8wc49Zx8w8g+2ZQT/NArO2mXlIixPMMJmZZsYWrlir9PARM9LMNJkxz0x4YAfVMraKiWVnNzONOp3RDqukcBa2BCXwWRR2yIzp4kGGzjXPzyWgseqSv5IdYTmGpvNFQwr583Lad1fSvoPSPixrPLHhNgjSpd/BKcKDX//9a8+9GiOerdnT+3hANOE+s167KxN2apMM8olOfQh+ss+WehU4nJFjxiSdfJoMwU0AZt+uFg0veELRNbuLpdNtZiyQDcDJBki3M2/L+wXc7Ox5OWug1xwjgT9yF8vrdmKOGWDZF7CttY6aWPnS662LxGt6dpx2zpJxwVOvmHHKzHHS6A1/jxmrZOVlclbBTqTpXDn7owlyINowwhz
@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 [email protected]: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://[email protected]: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.