This file contains hidden or 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
| "use client" | |
| import { usePathname } from "next/navigation" | |
| import { useEffect } from "react" | |
| import { toast } from "sonner" | |
| import * as v from "valibot" | |
| import { TOAST_COOKIE_NAME, ToastCommandSchema } from "./commons" | |
| /** |
This file contains hidden or 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 datetime import date, datetime | |
| WAREKI = [ | |
| (date(1989,1,8), date(2019,4,30), "平成"), | |
| (date(2019,5,1), date.max, "令和"), | |
| ] | |
| def seireki2wareki(target: str) -> str: | |
| try: |
This file contains hidden or 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 fastapi.security import HTTPBearer, HTTPAuthorizationCredentials | |
| from fastapi import FastAPI, Depends, HTTPException, status | |
| import firebase_admin | |
| from firebase_admin import auth, credentials | |
| app = FastAPI() | |
| cert = credentials.Certificate('path/to/cert.json') | |
| firebase_admin.initialize_app(cert) |
This file contains hidden or 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 requests | |
| from pprint import pprint | |
| CONFIG = { | |
| "apiKey": "YOUR API KEY", | |
| "authDomain": "YOURPROJECTID.firebaseapp.com", | |
| "databaseURL": "https://YOURPROJECTID.firebaseio.com", | |
| "projectId": "YOUR PROJECT ID", | |
| "storageBucket": "YOUR PROJECT ID.appspot.com", | |
| "messagingSenderId": "YOUR MESSAGE SENDER ID", |
This file contains hidden or 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 base64, uuid | |
| base64.urlsafe_b64encode(uuid.uuid1().bytes).rstrip(b'=').decode('ascii') |
This file contains hidden or 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
| for f in *.flv; ffmpeg -i $f -codec:v copy -codec:a copy (basename $f .flv).mp4; and rm $f; end |
This file contains hidden or 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
| use std::io; | |
| use rand; | |
| // StringからEnumにした | |
| type Board = Vec<Vec<Mark>>; | |
| enum Turn { | |
| Player, | |
| Bot, | |
| } |
This file contains hidden or 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="js" dir="ltr"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Qiita All Contributions</title> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.css"> | |
| </head> | |
| <body> | |
| <section class="section"> | |
| <div class="container"> |