Skip to content

Instantly share code, notes, and snippets.

View tai2's full-sized avatar
🐢

Taiju Muto tai2

🐢
View GitHub Profile
@tai2
tai2 / .bash_profile
Last active December 13, 2022 11:09
あたらしいMacにインストールするもの
# base-files version 3.7-1
# To pick up the latest recommended .bash_profile content,
# look in /etc/defaults/etc/skel/.bash_profile
# Modifying /etc/skel/.bash_profile directly will prevent
# setup from updating it.
# The copy in your home directory (~/.bash_profile) is yours, please
# feel free to customise it to create a shell
@tai2
tai2 / elgamal.py
Created April 3, 2020 14:32
エルガマル暗号?
#-*- coding: utf-8 -*-
"""
エル・ガマル公開鍵暗号系の仕組みを理解するために素朴に実装してみる。も
とのメッセージは、バイト列として受け取り、整数のリストに暗号化する。
エルガマル暗号系は、g^k ≡ a(mod p)の形の合同式において、p,g,kからaを
計算するのは簡単だが、逆にp,gaから、kを決定するのは難しいこと(離散対数
問題)を利用した、公開鍵暗号系である。
@tai2
tai2 / rsa.py
Created April 3, 2020 14:32
RSA実装?
#-*- coding: utf-8 -*-
"""
RSA公開暗号方式の仕組みを理解するために素朴に実装してみる。もとのメッ
セージは、バイト列として受け取り、整数のリストに暗号化する。
RSAは、(大きな数になると)素数の積を計算するのは簡単だが、逆に、合成数
を素因数分解するのは難しいという事実を利用したアルゴリズムである。
@tai2
tai2 / codereview.md
Created February 19, 2020 05:32
How to do a code review 個人的まとめ
@tai2
tai2 / README.md
Created December 11, 2019 04:08
OpenAPI go-gin-server

Go API Server for openapi

This is a sample server Petstore server. For this sample, you can use the api key special-key to test the authorization filters.

Overview

This server was generated by the [openapi-generator] (https://openapi-generator.tech) project. By using the OpenAPI-Spec from a remote server, you can easily generate a server stub.

@tai2
tai2 / README.md
Created December 11, 2019 04:02
OpenAPI go-server

Go API Server for openapi

This is a sample server Petstore server. For this sample, you can use the api key special-key to test the authorization filters.

Overview

This server was generated by the [openapi-generator] (https://openapi-generator.tech) project. By using the OpenAPI-Spec from a remote server, you can easily generate a server stub.

@tai2
tai2 / insertText.js
Created October 15, 2019 05:30
CDP Input.insertText using chrome-remote-interface
const CDP = require('chrome-remote-interface')
async function example() {
let client;
try {
client = await CDP()
const {Page, Input, DOM} = client
await Page.enable()
await DOM.enable()
英語は主に本からかなー。思い出せる限りまとめてみる。
英語勉強しはじめたのは、21から(それまで中学英語レベルもまったくできなかった)。
まず最初にやったのは、中学英語の教科書を本屋さんいって買ってきて、その本文を100回だっけな?
通しで音読した。英語に対する苦手意識を克服することが目的。全部暗記する勢いで読む。
Sunshine 1 [平成28年度採用] 教科書 (当時使ってたのこれじゃないけど参考までに)
https://www.amazon.co.jp/dp/430408075X/
それから、冠詞のメカニズムを理解するために冠詞の本読んだ。
export default class Deferred<T> {
promise: Promise<T>
resolve: (value?: T | PromiseLike<T>) => void
reject: (reason?: any) => void
constructor() {
this.resolve = () => {}
this.reject = () => {}
this.promise = new Promise<T>((resolve, reject) => {
this.reject = reject;