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
javascript:(()=>{const m=/^https:\/\/(www\.)?youtube\.com\/shorts\/([a-zA-Z0-9-_]+)$/.exec(location.href);if(m==null){alert("invoke it on shorts page");}else{location.href=`https://youtube.com/watch?v=${m[2]}`;}})(); |
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
//vscodeはコードをコピーしたとき、シンタックスハイライトされたhtmlをクリップボードに書き込む | |
// それを利用すると簡単にシンタックスハイライトされたhtmlを入手できる | |
(async () => { | |
const item = (await navigator.clipboard.read()).find(item => item.types.includes('text/html')); | |
item&&console.log(await (await item.getType('text/html')).text()); | |
})(); |
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 http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<style> | |
.list { | |
display: flex; | |
width: 320px; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
unsigned char base64_table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; | |
char *b64_encode(unsigned char *s, int len) { | |
int bit_len = len * 8; | |
int dest_len = bit_len / 6 + (bit_len % 6 != 0); |
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
const formGroup = new FormGroup({ | |
username: new FormControl([ | |
Validators.minLength({ | |
len: 1, | |
message: "user name must longer than or equal to 1", | |
}), | |
]), | |
}); |
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 React from "react"; | |
// lib.ts | |
type FieldValue<L, R> = { isValid: false; value: L; } | { isValid: true; value: R }; | |
type FieldApi<L, R> = { | |
setValue: (value: FieldValue<L, R>) => void; | |
getValue: () => FieldValue<L, R>; | |
}; | |
type FComponent<L, R> = React.VFC<{ field: FieldApi<L, R> }>; | |
type FItem<K extends string, L, R> = readonly [K, FComponent<L, R>]; |
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
// お試し珊瑚宮心海(lv80) | |
// 武器: 不滅の月華 lv80 | |
// HP:30711 | |
// 天賦lv: すべて8 | |
// 攻撃力:1271 | |
// ダメージバフ:83.2+15 | |
// 与える治療効果:70.9 | |
// 通常攻撃1段目:1399 | |
// 通常攻撃1段目(元素爆発中):6053 | |
// 敵: lv80ヒルチャール |
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 { Inject, ValidationPipe } from "@nestjs/common"; | |
import { NestFactory } from "@nestjs/core"; | |
import { Module } from "@nestjs/common"; | |
import { | |
IOModule, | |
RedisPubSub, | |
REDIS_PUB_SUB_TOKEN, | |
} from "nestjs-graphql-redis-subscriptions"; | |
class AppService { |
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
export const debuffResistance = (orig: number, debuff: number) => { | |
if (orig < debuff) { | |
return -(debuff - orig) / 2; | |
} else { | |
return orig - debuff; | |
} | |
}; | |
export const swirl = ( | |
char: { |
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
/** | |
* domain module | |
* UserAggregate | |
* - (Aggregate Root) User | |
* - (Aggregate Root) UserQuota | |
*/ | |
export class User { | |
#organizationId: number; | |
#name: string; |
NewerOlder