Skip to content

Instantly share code, notes, and snippets.

View mitsutaka's full-sized avatar
:shipit:
I'm here

Mitz Amano mitsutaka

:shipit:
I'm here
View GitHub Profile
@mitsutaka
mitsutaka / backend.tf
Created June 19, 2022 03:13
Terraform s3 backend config using Cloudflare R2
terraform {
backend "s3" {
access_key = "<access_key_id>"
secret_key = "<access_key_secret>"
endpoint = "<account_id>.r2.cloudflarestorage.com"
force_path_style = true
bucket = "<bucket name>" # e.g. tfstate
key = "<state name>" # e.g. tfe
region = "auto"
skip_region_validation = true
@mitsutaka
mitsutaka / proxy.pac
Last active April 25, 2020 02:51
home socks5
function FindProxyForURL(url, host)
{
if (isPlainHostName(host) ||
shExpMatch(host, "*.tokyo.local") ||
isInNet(dnsResolve(host), "10.0.0.0", "255.255.255.0"))
return "SOCKS 10.1.0.202:8008";
if (shExpMatch(host, "*.amazon.co.jp") ||
shExpMatch(host, "*.amazonvideo.com"))
return "SOCKS 10.1.0.202:8008";
@mitsutaka
mitsutaka / run.sh
Created July 2, 2019 01:12
launch coreos with software TPM
#!/bin/bash -xe
i=0
while [ -d /tmp/mytpm$i ]; do
let i=i+1
done
tpm=/tmp/tpm$i
disk=coreos_production_qemu_image.img
mkdir $tpm
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: cicd-node-examples-
spec:
entrypoint: cicd
arguments:
parameters:
- name: revision
value: 6e179c188c453eeb0f5da17439dddf61f962e208
@mitsutaka
mitsutaka / tokenwithhttpproxy.go
Last active February 5, 2019 07:49
GItHub Personal access token with http proxy
package main
import (
"context"
"errors"
"fmt"
"net"
"net/http"
"net/url"
"os"
package neco_goconvey_test
import (
"testing"
. "github.com/cybozu-go/neco-goconvey"
. "github.com/smartystreets/goconvey/convey"
)
func TestEtcdPasswd(t *testing.T) {
package neco_test_test
import (
. "github.com/cybozu-go/neco-test"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("NecoTest", func() {
#!/bin/sh -eux
sudo apt update
sudo apt install -y pkg-config libglib2.0-dev libseccomp-dev libdevmapper-dev libostree-dev btrfs-progs libgpgme-dev dirmngr go-md2man
for repo in github.com/opencontainers/runc github.com/projectatomic/buildah; do
/usr/local/go/bin/go get -u $repo
(cd $GOPATH/src/$repo; make && sudo make install)
done

2018 Kubernetes Contributor Summit EU

Welcome and Introduction

  • 191 key speakers

  • we've adopted the CNCF Code of Conduct

  • Wear T-shirts

  • Lunch is at 1 pm (not 12 pm)

  • SIG Updates start at 2pm, 5mins per SIG.

@mitsutaka
mitsutaka / tzupdate
Last active March 24, 2017 07:43
Automatically update timezone after network connection by NetworkManager
#!/bin/sh
#
# require: https://github.com/cdown/tzupdate
# path: /etc/NetworkManager/dispatcher.d/tzupdate
if [ "$2" = "up" ]; then
tzupdate
fi