Skip to content

Instantly share code, notes, and snippets.

View tMinamiii's full-sized avatar
:octocat:

Takahiro Minami tMinamiii

:octocat:
View GitHub Profile

思考のリファクタリング

全てのバグは、思考の中にある

エンジニアリングを行う組織について 個々の中で起きていることをしる必要があります。

エンジニアリング(工学)とは?

@tMinamiii
tMinamiii / handler.go
Last active September 20, 2023 12:07
pushtoken-api
package handler
import "github.com/labstack/echo/v4"
type UserDevice interface {
UpdatePushToken(echo.Context) error
}
type DeviceHandler struct {
}
@tMinamiii
tMinamiii / query.sh
Created September 7, 2023 05:50
dk-elasticsearch
curl -XGET 'http://internal-dev-delish-es-alb-1216483217.ap-northeast-1.elb.amazonaws.com:8080/delish-recipes/_search' -H 'Content-Type: application/json' -d'{
"_source":true,
"min_score":0.001,
"query":{
"bool":{
"filter":{
"terms":{
"state_premium":[0]
}
},
export ENV=local
if [ ${ENV} = "test" ]; then
source ./.test.env
elif [ ${ENV} = "local" ]; then
source ./.local.env
fi
export DYNAMODB_LOCAL_PORT
export DYNAMODB_LOCAL_ADMIN_PORT
@tMinamiii
tMinamiii / create_multi_db.sh
Last active July 24, 2023 08:40
chosen-week
#!/bin/sh
for num in $(seq 1 4); do
mysql -h127.0.0.1 -uroot -ptest -e"DROP DATABASE IF EXISTS mamadays_test$num;"
mysql -h127.0.0.1 -uroot -ptest -e"DROP DATABASE IF EXISTS mamadays_test_$num;"
mysql -h127.0.0.1 -uroot -ptest -e"CREATE DATABASE mamadays_test$num CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
DB_NUMBER=${num} sql-migrate up -env="test_parallel" -config="asset/db/dbconf.yml"
done
mysql -h127.0.0.1 -uroot -ptest -e"SHOW DATABASES;"

grpc link id token

-> Authfront End ->

dynamo table and relations

  • user_auth(1) : user_attribute(*)
  • user_authとuser_attributeは、uid で紐づく

user auth table

@tMinamiii
tMinamiii / memo.md
Last active May 7, 2023 04:18
graphql

About Graphql

  • mutation
    • REST APIのPOST/PUT/DELETE/PATCH
    • リソースに変更を加える
  • query
    • REST APIのGET
    • リソースを取得する
@tMinamiii
tMinamiii / decls.md
Last active May 3, 2023 09:41
mockgen調査

Decls

top-level declarations; or nil

Decls []ast.Decl{
  &ast.GenDecl{
    Doc: (*ast.CommentGroup)(nil),
    TokPos: 19,
    Tok: 75,
#!/bin/bash
set -Ceu
CURRENT_GO_VERSION=$(go version | cut -f 3 -d " ")
LATEST_GO_VERSION=$(curl -s 'https://go.dev/dl/?mode=json' | jq -r '[.[]][0].version')
if [ "${CURRENT_GO_VERSION}" = "${LATEST_GO_VERSION}" ]; then
echo "latest version already installed. -- ${CURRENT_GO_VERSION}"
exit 0
@tMinamiii
tMinamiii / install.sh
Created September 13, 2022 12:55
go update
#!/bin/bash
set -Ceu
LATEST_GO_VERSION=$(curl -s 'https://go.dev/dl/?mode=json' | jq -r '[.[]][0].version')
echo "Latest go version is --- ${LATEST_GO_VERSION} ---"
GOGZ="${LATEST_GO_VERSION}.linux-amd64.tar.gz"