This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian | |
RUN apt-get update && apt-get install -y \ | |
zip \ | |
unzip \ | |
curl | |
WORKDIR /work |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Client } from 'pg'; | |
interface Todo { | |
id?: string; | |
title: string; | |
content: string; | |
userId: number; | |
completed: number; | |
createdAt?: Date; | |
updatedAt?: Date; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pool } from 'pg'; | |
// PostgreSQLの接続設定 | |
const pool = new Pool({ | |
user: 'your_username', | |
host: 'localhost', | |
database: 'your_database', | |
password: 'your_password', | |
port: 5432, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pool } from 'pg'; | |
// PostgreSQLの接続設定 | |
const pool = new Pool({ | |
user: 'your_db_user', | |
host: 'localhost', // データベースホスト(例: localhost) | |
database: 'your_db_name', | |
password: 'your_db_password', | |
port: 5432, // PostgreSQLのデフォルトポート | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>SSE Example</title> | |
</head> | |
<body> | |
<h1>Server-Sent Events (SSE)</h1> | |
<div id="messages"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nodemailer from 'nodemailer'; | |
const GOOGLE_MAIL_USER = "your_email@gmail.com"; | |
const GOOGLE_MAIL_PASSWORD = "123"; | |
const TO_MAIL= "recipient_email@example.com"; | |
// | |
async function sendMail() { | |
// SMTPトランスポートの設定 | |
const transporter = nodemailer.createTransport({ | |
service: 'gmail', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { MetaFunction } from "@remix-run/node"; | |
import React, { useEffect, useRef } from 'react'; | |
import mermaid from 'mermaid'; | |
// | |
type Props = { | |
src: string; | |
className?: string; | |
}; | |
// | |
export function Mermaid({ src, className }: Props) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Your Page</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
</head> | |
<body class="bg-gray-100"> | |
<div class="container mx-auto my-2 px-8 py-8"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { component$, useSignal, useStore, useComputed$, useTask$, $ } from '@builder.io/qwik'; | |
import './app.css' | |
// | |
const dataItems = [ | |
{id:1 , title: "title_1"}, | |
{id:2 , title: "title_2"}, | |
{id:3 , title: "title_3"}, | |
]; | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VITE_API_KEY="123" | |
VITE_API_URL=http://localhost:4000 |
NewerOlder