Skip to content

Instantly share code, notes, and snippets.

@junkor-1011
junkor-1011 / README.md
Last active April 6, 2023 16:38
type-challenges

type-challenges

@junkor-1011
junkor-1011 / .env.default
Last active February 14, 2023 16:29
localstack + s3 presigned url
AWS_ACCESS_KEY_ID=test
AWS_SECRET_ACCESS_KEY=test
AWS_DEFAULT_REGION=ap-northeast-1
USE_LOCALSTACK=true
@junkor-1011
junkor-1011 / README.md
Last active February 13, 2023 15:44
引数が部分型となる関数を引数にとる(TypeScript)

引数が部分型となる関数を引数にとる(TypeScript)

自分用メモof自分用メモ

タイトルだけだと意味不明過ぎるが、状況としては

  • とある関数に引数の一部の内容に応じて何らかの処理を付加した新しい関数を作りたい

といった状況を考える。

@junkor-1011
junkor-1011 / .env.default
Last active February 9, 2023 16:18
postgresql ユーザー作成実験メモ
DATABASE_URL="postgresql://postgres:password@localhost:5432/appdb?schema=app&connection_limit=1"
@junkor-1011
junkor-1011 / README.md
Last active January 21, 2023 15:38
[article scrip]fastify sensible

fastify-sensibleを試してみる

最近fastifyを使っていて、たまたまfastify-sensibleというプラグインを見つけたのでメモ。 fastifyに便利なユーティリティーを追加するプラグイン、といった感じらしい。 GitHubリポジトリの例などはJavaScriptだったので、TypeScriptでもちゃんと動くか一応確認した。(※何の問題も無く動いた)

動作検証

検証環境

@junkor-1011
junkor-1011 / README.md
Last active January 17, 2023 16:32
LT資料 dependency-cruiser
@junkor-1011
junkor-1011 / .gitignore
Created January 16, 2023 13:47
fastify inject test
# Created by https://www.toptal.com/developers/gitignore/api/node,vim,visualstudiocode,emacs,intellij+all
# Edit at https://www.toptal.com/developers/gitignore?templates=node,vim,visualstudiocode,emacs,intellij+all
### Emacs ###
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
@junkor-1011
junkor-1011 / README.md
Created December 19, 2022 16:54
LT用メモ: aws rds + lambda

rds + lambda

RDSにLambdaから接続しにいくときの注意点などの整理(中途)

tl;dr;

  • 思考停止でこうすればOK、みたいなのは危険そう
  • コネクションの張り方や維持のされ方に気をつけてケースバイケースで設計、設定をしていく必要がありそう

1. Lambdaの同時接続によるコネクションの枯渇問題

@junkor-1011
junkor-1011 / README.md
Last active December 12, 2022 16:30
LT資料: aspidaとopenapiによる型安全なWeb APIへのリクエスト処理
@junkor-1011
junkor-1011 / README.md
Last active December 5, 2022 13:48
LT資料: openapiと同期したWeb API開発(fastify)