Skip to content

Instantly share code, notes, and snippets.

View mryhryki's full-sized avatar
😄

MORIYA Hiroyuki mryhryki

😄
View GitHub Profile
.env.sh
node_modules
package-lock.json
@mryhryki
mryhryki / !README.md
Last active August 21, 2025 02:40
Argon2 Test on Docker
@mryhryki
mryhryki / sequence.mermaid
Last active December 23, 2024 03:22
OAuth 2.0 の Authorization Code Flow を Webアプリで考えた場合のシーケンス図
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mryhryki
mryhryki / color.sh
Last active December 5, 2024 07:05
Show color patterns on CLI
#!/usr/bin/env bash
printf "\e[30m%se[30m \e[0m" '\'
printf "\e[31m%se[31m \e[0m" '\'
printf "\e[32m%se[32m \e[0m" '\'
printf "\e[33m%se[33m \e[0m" '\'
printf "\e[34m%se[34m \e[0m" '\'
printf "\e[35m%se[35m \e[0m" '\'
printf "\e[36m%se[36m \e[0m" '\'
printf "\e[37m%se[37m \e[0m" '\'

test-nano-id

Result

This is a result of the test in my environment.

$ npm start >/dev/null
[Generate 1000000 IDs, Node.js version: v20.14.0]
#crypto.generateRandomUUID(): 1408.667041ms

Check binary size generated by bun compile

How to Use

git clone "https://gist.github.com/371c1c782c2b885d2765ac2143670ecb.git" "./bun-compile-size"
sh ./bun-compile-size/exec.sh
less "./bun-compile-size/$(ls -1 "./bun-compile-size" | sort | grep -E "^_log-.*\.md$" | tail -n 1)"

Issue M2M Token for Auth0

Prepare

  1. Setup Node.js (Required version >= 20)
  2. Clone this Gist
  3. Run npm install to install dependencies

Set Common Environment Variables

@mryhryki
mryhryki / !README.md
Last active April 24, 2024 08:32
Demo scripts for STUDDi on 2023-10-10.

Demo scripts for STUDDi on 2023-10-10

How to Use

Prepare

export SCRIPT_URL='https://gist.githubusercontent.com/mryhryki/20764e285704e29aa075c758a5e273bf/raw/index.ts?1'
@mryhryki
mryhryki / !README.md
Last active May 5, 2023 09:20
Comparison of search speeds between Arrays and Sets

Comparison of search speeds between Arrays and Sets

Execution

$ node ./index.js

Result