Skip to content

Instantly share code, notes, and snippets.

View tatsuyasusukida's full-sized avatar

Tatsuya Sususkida tatsuyasusukida

View GitHub Profile
@tatsuyasusukida
tatsuyasusukida / article.js
Created June 28, 2022 23:37
🚀 How to migrate from CJS to ESM with Sequelize: CJS part
module.exports = function (sequelize, DataTypes) {
const article = sequelize.define('article', {})
article.associate = (models) => {
article.belongsTo(models.user)
}
return article
}
@tatsuyasusukida
tatsuyasusukida / !README-sequelize-planetscale.md
Last active June 18, 2025 03:32
🌏 How to access PlanetScale from Sequelize
@tatsuyasusukida
tatsuyasusukida / _app.tsx
Last active June 22, 2022 23:44
How to use Bootstrap dropdown in Next.js
import 'bootstrap/dist/css/bootstrap.css'
import type { AppProps } from 'next/app'
function MyApp({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />
}
export default MyApp
@tatsuyasusukida
tatsuyasusukida / !README-sequelize-unexpected-delete.md
Last active June 15, 2022 23:28
😳 How to prevent a child from deleting a parent in Sequelize

😳 How to prevent a child from deleting a parent in Sequelize

About this article

While coding with Sequelize, I found an interesting behavior where when I deleted a record in a child model, the record in the parent model was deleted. This article describes how to reproduce and prevent the behavior. The related resources are shown below.

@tatsuyasusukida
tatsuyasusukida / !README-gcp-text-to-speech.md
Last active June 7, 2022 22:54
🎤 How to convert text to speech using Google Text-to-Speech in Node.js [demo video available]

🎤 How to convert text to speech using Google Text-to-Speech in Node.js [demo video available]

Demo video: How to convert text to speech using Google Text-to-Speech in Node.js

About this article

This article describes how to convert text to speech with Cloud Text-to-Speech from Google Cloud Platform (GCP) in Node.js. The related resources are shown below.

@tatsuyasusukida
tatsuyasusukida / !README-hana-forms-admin.md
Last active June 21, 2022 22:46
🌷 Node.js tutorial to make Google Forms within 3 hours | Hana Forms Admin (a subsystem for users to manage forms) [demo video available]

🌹 Node.js tutorial to make Google Forms within 3 hours | Hana Forms Admin (a subsystem for users to manage forms) [demo video available]

Demo video thumbnail

About this article

This article describes how to make a online form creator like Google Forms Forms in Node.js. The online form creator implemented in this article consists of the following two subsystems.

@tatsuyasusukida
tatsuyasusukida / .dockerignore
Last active July 12, 2022 01:15
📜 Puppeteer HTML to PDF converter
/node_modules/
/.env
/test.pdf
@tatsuyasusukida
tatsuyasusukida / !README-hana-forms-public.md
Last active September 8, 2022 01:01
🌻 Node.js tutorial to make Google Forms within an hour | Hana Forms Public (a subsystem for users to enter their answers) [demo video available]

🌻 Node.js tutorial to make Google Forms within an hour | Hana Forms Public (a subsystem for users to enter their answers) [demo video available]

Demo video thumbnail

About this article

This article describes how to make a online form creator like Google Forms in Node.js. The online form creator implemented in this article consists of the following two subsystems.

@tatsuyasusukida
tatsuyasusukida / !README-nodejs-upload-non-multipart.md
Last active May 19, 2022 21:41
⬆️ Node.js file upload example without using multipart/form-data [video version available]

⬆️ Node.js file upload example without using multipart/form-data [video version available]

Video thumbnail: Node.js file upload example without using multipart/form-data

About this article

This article describes you how to upload files in Node.js without using multipart/form-data. The related resources are as follows.

@tatsuyasusukida
tatsuyasusukida / !README-javascript-download-file.md
Last active May 17, 2022 19:57
🚎 How to download files with JavaScript [video version available]

🚎 How to download files with JavaScript [video version available]

Video thumbnail: How to download files with JavaScript

About this article

In this article, I will introduce how to download text files etc. with JavaScript on the front end (browser side). The related resources are as follows.