Skip to content

Instantly share code, notes, and snippets.

View varmil's full-sized avatar
🏠
Working from home

Akihiro Yamamoto varmil

🏠
Working from home
View GitHub Profile
@varmil
varmil / LocalEmulatorAuth.ts
Last active November 14, 2021 09:14
the singleton class when run e2e testing with Firebase Authentication x Local Emulator Suite
import * as admin from 'firebase-admin'
import axios from 'axios'
const PROJECT_ID = 'your-project-id'
type FirebaseAuthAPIUser = {
idToken: string // 新しく作成されたユーザーのFirebaseAuthIDトークン。
email: string // 新しく作成されたユーザーの電子メール。
refreshToken: string // 新しく作成されたユーザーのFirebaseAuth更新トークン。
expiresIn: string // IDトークンの有効期限が切れる秒数。
@varmil
varmil / bad
Last active October 12, 2019 22:06
【javascript】処理を分岐させるのにswitch caseを使うのはもう終わりにしよう ref: https://qiita.com/varmil/items/45693ed687b34d29e12f
var f = function(v) {
switch (v) {
case 'a':
return 1;
break;
case 'b':
return 2;
break;
case 'c':
return 3;
@varmil
varmil / .bash_profile
Last active June 9, 2019 23:36
「Git補完をしらない」「git statusを1日100回は使う」そんなあなたに朗報【git-completionとgit-prompt】 ref: https://qiita.com/varmil/items/9b0aeafa85975474e9b6
# スクリプト読み込み
source $HOME/.git-completion.bash
source $HOME/.git-prompt.sh
# プロンプトに各種情報を表示
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWUPSTREAM=1
GIT_PS1_SHOWUNTRACKEDFILES=
GIT_PS1_SHOWSTASHSTATE=1

ターニャ D+520 試練2

1 2 3 4 5 6
戦闘 悲鳴 共墓
三頭 加速 双頭
加速 加速 双頭
機能 戦闘 共墓
  • 序盤に琥珀石GET
@varmil
varmil / file0.cs
Last active November 14, 2018 06:38
古典的オブザーバパターンをいまさら基礎からみる【デザインパターン】 ref: https://qiita.com/varmil/items/8cd8fe9da510e31d940a
class Model
{
// データ変更時に呼ばれる
void DataChanged() {
// 変更後のデータを取得
var newData = this.GetData();
// ModelからViewを直接変更(MVC原則に違反しています!)
FooView.Update(newData);
}
}
///////////////////
/// PARSER CORE ///
///////////////////
// There is an annotated configuration object in the GRAMMAR section below
function Parser(config) {
var prio = this.priorities = config.priorities;
prio["boundary:$"] = [-1, -1];
this.re = config.re;
this.toktypes = config.toktypes;
@varmil
varmil / file0.txt
Last active January 20, 2017 13:53
docker-nginx を vagrant(centos 7)上で動かしたが、mac(ローカルマシン)から接続できず苦戦した話 ref: http://qiita.com/varmil/items/3a93709d935ed2d710d5
nginx:
image: nginx:1.10.2-alpine
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/mynginx.cnf:/etc/nginx/conf.d/mysite.template
ports:
- "8080:80"
environment:
- NGINX_HOST=127.0.0.1
- NGINX_PORT=80
@varmil
varmil / Vagrantfile
Last active January 10, 2017 03:39
vagrant + centos 7 でvagrant upが止まる、ネットワーク接続できない問題への対処 ref: http://qiita.com/varmil/items/4da286337c9cb9214301
config.vm.provision "shell", run: "always", inline: "systemctl restart network.service"
@varmil
varmil / file0.txt
Last active August 9, 2016 13:56
【javascript】やさしいクラスの作り方 ref: http://qiita.com/varmil/items/99fd6f2a886fdde4b7fa
// constructor
var hoge = function(arg) {
this.x = 5;
this.y = 10;
this.z = arg;
};
// メソッド
hoge.prototype = {
f1: function() {
@varmil
varmil / file0.sql
Created May 30, 2016 03:52
【MySQL】基礎。InnoDBのbuffer poolはページ単位(列ではなく)でキャッシュする ref: http://qiita.com/varmil/items/52684b32fad16b653dba
SELECT Name,Dept FROM Employees WHERE Id = 3;