Skip to content

Instantly share code, notes, and snippets.

View evalphobia's full-sized avatar

evalphobia

View GitHub Profile
@evalphobia
evalphobia / list.txt
Created December 19, 2022 12:34
Check PayPal payment data from Transaction ID
1122334455667788A
AABBCCDDEEFFGGHH1
@evalphobia
evalphobia / README.md
Last active December 19, 2022 04:15
Golang Benchmark: uuid(v4) vs cuid vs nanoid

Golang Benchmark: uuid(v4) vs cuid vs nanoid

Comparing these libraries

  • github.com/google/uuid
  • github.com/lucsky/cuid
  • github.com/matoous/go-nanoid

result

@evalphobia
evalphobia / resize_jpg.go
Created March 19, 2020 10:11
Resizing Image (Jpeg) for golang
package library
import (
"bytes"
"image"
"image/jpeg"
"io"
"github.com/disintegration/imaging"
)
(() => {
// initialize app
function init() {
_firebaseInit()
_firebaseAuthInit()
}
function _(el) {
return document.getElementById(el);
@evalphobia
evalphobia / benchmark_test.go
Last active December 26, 2019 11:40
Golang Benchmark for Slice Map Decoder of DynamoDB result on github.com/evalphobia/aws-sdk-go-wrapper
package dynamodb
import (
"fmt"
"testing"
"github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute"
)
func BenchmarkToSliceMap_old(b *testing.B) {
@evalphobia
evalphobia / example.go
Last active December 23, 2019 04:19
How to use context.Cancel: Execute multiple process and gets the single fastest result.
package example
import (
"context"
)
// 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
evalphobia / benchmark.csv
Created September 5, 2019 07:42
Benchmark DeepLearning performance of GPU on GCP AI Platform (Cloud ML Engine)
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
(wip)

SRE: Reaching Beyond Your Walls

  • GoogleでSREの実践を始めて14年経過
  • 最初のSRE本を出してからのこの2年間は興味深かった
    • SREを実践する人や企業が想像以上に増えた
    • Google以外のエコシステムの拡大とSREの将来の予測の難しさ
      • いくつかのトレンドあり
  • この章ではこれまでに見てきたことと結論づけたことを記載

負荷の管理

  • 100%の時間 利用可能なサービスはない
    • 配慮のないクライアント
    • 50倍の要求
      • (訳注: 上記2つはPokemon Goのことでもある)
    • スラフィックのスパイク
    • 海底ケーブルの切断
  • 私達のサービスに依存するユーザーがいる

オンコール

  • オンコール

    • 緊急対応とその準備
    • SREはよくオンコール対応要員として必要になる
    • SREは必要に応じてインシデントの診断・緩和・修正・エスカレーションをする
    • さらに加えて、緊急でないものについても見ている
  • GoogleのSRE

  • オンコール対応