Skip to content

Instantly share code, notes, and snippets.

View access_bulk_download_objects_in_my_s3_bucket_from_a_company_ip.tf
locals {
a_ips = ["93.184.216.34/32"] # dummy A company ip
}
# for log
resource "aws_s3_bucket" "logs" {
bucket = "hoge.logs"
acl = "log-delivery-write"
versioning {
View validator_sample.go
package main
import (
"fmt"
"github.com/go-playground/validator"
)
type User struct {
FirstName string `validate:"required"` //必須
View keybase.md

Keybase proof

I hereby claim:

  • I am kenzo0107 on github.
  • I am kenzo0107 (https://keybase.io/kenzo0107) on keybase.
  • I have a public key ASDS2szFSmiEIGa57wzFOkHyCYi3cmkSgMx8TKVpa2HBDQo

To claim this, I am signing this object:

View multierr_sample.go
package main
import (
"errors"
"fmt"
"go.uber.org/multierr"
)
func step1() error {
View jpg2png.go
// 【TRY】画像変換コマンドを作ろう
package main
import (
"fmt"
"image/jpeg"
"image/png"
"log"
"os"
"path/filepath"
View cat_command.go
//【TRY】catコマンドを作ろう
package main
import (
"bufio"
"flag"
"fmt"
"log"
"os"
)
View install_helm.sh
# macOS
OS_TYPE=darwin
# Linux
OS_TYPE=linux
# Helm version
VERSION=2.9.1
cd /tmp
curl -sL https://storage.googleapis.com/kubernetes-helm/helm-v${VERSION}-${OS_TYPE}-amd64.tar.gz \
View tmux_migrate.sh
wget https://gist.githubusercontent.com/tbutts/6abf7fb5b948c066bf180922fb37adcf/raw/198f744327a9924febdd11677f044a4ecd3f3c96/tmux-migrate-options.py
cp ~/.tmux.conf ~/.tmux.conf.org
python tmux-migrate-options.py ~/.tmux.conf.org > ~/.tmux.conf
diff ~/.tmux.conf.org ~/.tmux.conf
View anyenv.md

Install anyenv

$ git clone https://github.com/anyenv/anyenv ~/.anyenv
$ echo 'eval "$(anyenv init)"' >> ~/.your_profile

// reload your configuraiton of shell
$ exec $SHELL -l

setup anyenv plugin

@kenzo0107
kenzo0107 / put_message_cloudwatch_logs.sh
Last active Feb 10, 2020
put message to CloudWatch Logs
View put_message_cloudwatch_logs.sh
#!/bin/bash
# region
export AWS_DEFAULT_REGION=ap-northeast-1
# CloudWatchLogs settings
LogGroupName="Test"
LogStreamName="App1"
# message put to CloudWatchLogs
You can’t perform that action at this time.