- File Watchersプラグインを入れる
- File WatchersにBiomeの設定を追加
- Actions on SaveでBiomeのFile Wathcers設定を有効化
- Actions on SaveのActivated on設定をAny saveに変更
- 元の設定だと保存時ではなく変更時に走る
# Enable VoiceOver Apple Script | |
do shell script "/System/Library/CoreServices/VoiceOver.app/Contents/MacOS/VoiceOverStarter" |
import type { ZodObject, ZodRawShape } from "zod"; | |
import { zodToJsonSchema } from "zod-to-json-schema"; | |
/** | |
* zod と zod-to-json-schema を使って型安全に completion 結果を得るコード | |
*/ | |
export const createChatCompletionWithFunction = async <T extends ZodRawShape>( | |
messages: ChatCompletionRequestMessage[], | |
functionName: string, | |
schema: ZodObject<T> |
export const datetimeWithTZ = <T extends ColumnBaseConfig>( | |
column: MySqlDateTimeString<T> | |
) => | |
sql`DATE_FORMAT(${column}, '%Y-%m-%dT%TZ')`.mapWith((v) => new Date(v)); | |
// example | |
// await db.select({ createdAt: datetimeWithTz(table.createdAt) }).from(table); |
The Book https://doc.rust-jp.rs/book-ja/title-page.html
Rust by Example https://doc.rust-jp.rs/rust-by-example-ja/index.html
Rust Cookbook https://uma0317.github.io/rust-cookbook-ja/intro.html
var attribute = "data-sender-name"; | |
// HACK | |
var getChatTextDoms = () => | |
Array.prototype.slice | |
.call(document.querySelectorAll("*")) | |
.filter((el) => typeof el.attributes[attribute] !== "undefined"); | |
var texts = getChatTextDoms(); |
{"lastUpload":"2021-06-17T10:22:47.838Z","extensionVersion":"v3.4.3"} |
sed -e 's/\.[^\.]*$//' |
// japanese to english | |
(function() { | |
var text = window.getSelection(); | |
var url = "https://translate.google.co.jp/?hl=ja#view=home&op=translate&sl=ja&tl=en&text=" + text; | |
window.open(url); | |
})(); | |
// compiled with Google Closure Compiler | |
// javascript:window.open("https://translate.google.co.jp/?hl=ja#view=home&op=translate&sl=ja&tl=en&text="+window.getSelection()); | |
// english to japanese |
### append to .bashrc | |
alias pbcopy="iconv -f UTF-8 -t CP932 | /c/Windows/System32/clip.exe" |