Skip to content

Instantly share code, notes, and snippets.

View igtm's full-sized avatar
🖥️
Work, work and work!

Iguchi Tomokatsu igtm

🖥️
Work, work and work!
View GitHub Profile
@igtm
igtm / design.go
Created December 15, 2020 12:15
example code of uploading file on Goa v3
package design
import . "goa.design/goa/v3/dsl"
// TODO
// var _ = API("foo", func() { ....
var SourceFilePayload = Type("SourceFilePayload", func() {
Attribute("file_name", String, "uploaded file name", func() {
Go 13 hrs 56 mins █████████████▌░░░░░░░ 64.6%
Terraform 3 hrs 5 mins ███░░░░░░░░░░░░░░░░░░ 14.3%
SQL 1 hr 32 mins █▍░░░░░░░░░░░░░░░░░░░ 7.1%
TypeScript 1 hr 15 mins █▏░░░░░░░░░░░░░░░░░░░ 5.8%
YAML 1 hr 11 mins █▏░░░░░░░░░░░░░░░░░░░ 5.5%
@igtm
igtm / merge-gql-operations.sh
Last active December 29, 2019 05:24
merge-gql-operations.sh
#!/bin/sh
set -e
PJROOT_DIR=$(pwd)
CONFLICT_IDENTIFIER="======="
# expected directory structure
# src/gql/queries/*.gql
# src/gql/mutations/*.gql
# ./schema.graphql
@igtm
igtm / Dockerfile
Created December 18, 2019 05:37
Go用最小構成Dockerfile(スタティックビルドしたシングルバイナリとsslcertsファイルのみ)
FROM scratch
COPY --from=golang:1.13 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY server /app/
CMD ["/app/server"]
@igtm
igtm / download-images-using-googliser.sh
Created March 31, 2019 06:41
Auto refreshing Desktop Pictures for Mac. picking them up from Google search results.
#!/bin/sh
# refreshes Desktop Pictures in Mac picking them up from Google search results.
#
# How to achieve:
# 1. Download dependent packages
# - you should first install googliser.sh
# see https://github.com/teracow/googliser
#
# 2. Donload this file
# 3. Create a directory and Modify this file
@igtm
igtm / file0.txt
Last active September 11, 2017 12:48
Goの同時関数呼び出しを1回で済ませられるライブラリ 「SingleFlight」 が便利 ref: http://qiita.com/igtm/items/8b5343272bc35cd3bc0b
echo "GET http://localhost:1323/hoge" | vegeta attack -duration=1m -rate=100 | vegeta report -reporter=plot > plot.html
@igtm
igtm / file0.txt
Created July 3, 2016 02:44
スマホwebサイトのクリック遅延を簡単解消! ref: http://qiita.com/igtm/items/0d421d3284c8ff1cc7aa
<script type='application/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js'></script>