Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block evalphobia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
evalphobia / The Three Go Landmines.ja.markdown
Last active Jan 11, 2020 — forked from lavalamp/The Three Go Landmines.markdown
Go言語の地雷(原題: Golang landmines)
View The Three Go Landmines.ja.markdown


1: ループ変数がループ外のスコープになっている


evalphobia / benchmark_test.go
Last active Dec 26, 2019
Golang Benchmark for Slice Map Decoder of DynamoDB result on
View benchmark_test.go
package dynamodb
import (
func BenchmarkToSliceMap_old(b *testing.B) {
evalphobia / example.go
Last active Dec 23, 2019
How to use context.Cancel: Execute multiple process and gets the single fastest result.
View example.go
package example
import (
// Executor is example process.
// This might be, downloading data via http / reading data from local big file / waiting data from client etc...
type Executor interface {
Exec() (data interface{}, err error) // this might take a long time.
evalphobia /
Created Oct 24, 2016
Send Slack to SSH login alert
# original from
if [ "$PAM_TYPE" != "close_session" ]; then
whitelist=" localhost" # change here
# check authorized host
for HOST in $whitelist
evalphobia /
Last active Sep 27, 2019
Golang Benchmark: gob vs json


  • gob is faster on Go1.7.1
    • map[int64]float64
    • []map[int64]float64


benchmark result to encode/decode map[int64]float64

evalphobia / benchmark.csv
Created Sep 5, 2019
Benchmark DeepLearning performance of GPU on GCP AI Platform (Cloud ML Engine)
View benchmark.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
evalphobia / atoi_test.go
Last active Aug 6, 2019
golang benchmark: String and Int conversions
View atoi_test.go
package bench
import (
var smallStr = "35"
var bigStr = "999999999999999"


  • 100%の時間 利用可能なサービスはない
    • 配慮のないクライアント
    • 50倍の要求
      • (訳注: 上記2つはPokemon Goのことでもある)
    • スラフィックのスパイク
    • 海底ケーブルの切断
  • 私達のサービスに依存するユーザーがいる
evalphobia / action.js
Created Jul 5, 2018
To fetch Google Calendar event. (Running on Firebase Functions for Dialogflow)
View action.js
class Action {
constructor(req, res){
this.request = req;
this.response = res;
this.requestSource = (req.body.originalRequest) ? req.body.originalRequest.source : undefined; = new DialogflowApp({req, res});
evalphobia /
Last active May 22, 2019
The Site Reliability Workbook: Chapter 1


SRE本が教科書/参考書とするとワークブックは問題集。 SRE本は主に原則や哲学を説明していたが、ワークブックはその原則をどのように適用していくかについて説明。 SRE本はGoogle内でのSREの実践例の話だったが、ワークブックはその他の企業(GCPユーザー)での話もあり。

  • Evernote, Home Depot, NY Times, Spotify

1. SREはDevOpsにどのように関わっていくのか

You can’t perform that action at this time.