Skip to content

Instantly share code, notes, and snippets.

package main
import (
"embed"
"net/http"
)
//go:embed index.html
//go:embed style.css
var public embed.FS
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>card登録用のtokenを取得</title>
<link rel="stylesheet" href="style.css" />
<script src="https://js.stripe.com/v3/"></script>
</head>
import logging
logger = logging.getLogger(__name__)
mapping = {
"TRACE": "[ trace ]",
"DEBUG": "[ \x1b[0;36mdebug\x1b[0m ]",
"INFO": "[ \x1b[0;32minfo\x1b[0m ]",
"WARNING": "[ \x1b[0;33mwarn\x1b[0m ]",
"WARN": "[ \x1b[0;33mwarn\x1b[0m ]",
import express from "express";
import process from "process";
async function main() {
const app = express();
const port = 3000;
app.get("/hello", (req, res) => {
res.send("Hello World!");
});
@podhmo
podhmo / x.py
Created February 10, 2024 06:04
class A:
def __init__(self):
self.__c = 1
def a(self):
self.__c += 1
def show(self):
print(f"{self=} a.c is {self.__c=}")
serve:
go build -o /tmp/xxx main.go && /tmp/xxx
tree:
tree .
click-a:
DEBUG=pw:api npx tsx main.ts
click-button:
DEBUG=pw:api npx tsx main2.ts
--- 2.0.md 2023-12-09 17:21:54
+++ 3.0.0.md 2023-12-09 17:21:54
@@ -1,36 +1,83 @@
# OpenAPI Specification
-## (fka Swagger RESTful API Documentation Specification)
-#### Version 2.0
+#### Version 3.0.0
-The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](http://www.ietf.org/rfc/rfc2119.txt).
--- 3.0.0.md 2023-12-09 17:21:54
+++ 3.0.1.md 2023-12-09 17:21:54
@@ -1,10 +1,10 @@
# OpenAPI Specification
-#### Version 3.0.0
+#### Version 3.0.1
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [BCP 14](https://tools.ietf.org/html/bcp14) [RFC2119](https://tools.ietf.org/html/rfc2119) [RFC8174](https://tools.ietf.org/html/rfc8174) when, and only when, they appear in all capitals, as shown here.
--- 3.0.1.md 2023-12-09 17:21:54
+++ 3.0.2.md 2023-12-09 17:21:54
@@ -1,6 +1,6 @@
# OpenAPI Specification
-#### Version 3.0.1
+#### Version 3.0.2
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [BCP 14](https://tools.ietf.org/html/bcp14) [RFC2119](https://tools.ietf.org/html/rfc2119) [RFC8174](https://tools.ietf.org/html/rfc8174) when, and only when, they appear in all capitals, as shown here.
--- 3.0.2.md 2023-12-09 17:21:54
+++ 3.0.3.md 2023-12-09 17:21:54
@@ -1,6 +1,6 @@
# OpenAPI Specification
-#### Version 3.0.2
+#### Version 3.0.3
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [BCP 14](https://tools.ietf.org/html/bcp14) [RFC2119](https://tools.ietf.org/html/rfc2119) [RFC8174](https://tools.ietf.org/html/rfc8174) when, and only when, they appear in all capitals, as shown here.