Skip to content

Instantly share code, notes, and snippets.

View nabeken's full-sized avatar

Tanabe Ken-ichi nabeken

View GitHub Profile
name: AWS Key Rotation
on:
push:
branches:
- actions/aws_key_rotate
schedule:
- cron: '* 0 * * 1'
@nabeken
nabeken / fargate-cpu.md
Created March 25, 2020 14:28
FargateのvCPU性能と価格感等雑感

こちらはAWS Fargate Advent Calendar 2017の12/13分の記事です。

普段の業務ではECS上でGoで書いたアプリケーションを運用しています。

日本からre:Inventのライブストリームを視聴していた勢ですが、予想通りEKSとLambdaのGo対応がアナウンスされ感激していたら、さらにFargateまで来てしまい、とても興奮した二日間になりました。

今回はFargateのアドベントカレンダーにお声掛け頂いたので小ネタと雑感などを記したいと思います。

Fargateで提供されるvCPUの性能について

@nabeken
nabeken / readseekcloser.go
Last active October 29, 2015 12:08
Tempfile-based ReadSeekCloser implementation
package ioutils
import (
"io"
"io/ioutil"
"log"
"os"
"sync"
"sync/atomic"
)
// Add conditon and it should fail
{
err := dtable.PutItem(
items[0],
option.PutExpressionAttributeName("date", "#date"),
option.PutCondition("attribute_not_exists(#date)"),
)
assert.Error(err)
func (s *BucketSuite) TestObject() {
key := "test-object"
ct := "application/json"
cl := int64(len(s.testdata))
content, err := ioutils.NewFileReadSeeker(bytes.NewReader(s.testdata))
if !s.NoError(err) {
return
}
defer content.Close()
@nabeken
nabeken / main.go
Last active August 29, 2015 14:20
Proxy Protocol Checker
package main
import (
"flag"
"io"
"log"
"net"
"os"
"github.com/armon/go-proxyproto"
# This file describes the standard way to build Docker, using docker
#
# Usage:
#
# # Assemble the full dev environment. This is slow the first time.
# docker build -t docker .
#
# # Mount your source in an interactive container for quick testing:
# docker run -v `pwd`:/go/src/github.com/docker/docker --privileged -i -t docker bash
#
@nabeken
nabeken / packer-ami.rb
Last active August 29, 2015 14:18
A helper script to build AMI with Packer
#!/usr/bin/env ruby
# https://gist.github.com/nabeken/8c26b7335348e8e4c916
require 'open3'
require 'yaml'
ROOT_DIR = File.expand_path(File.join(File.dirname(__FILE__), '..'))
def load_yaml(str)
YAML.load(str) || {}
end
// +build debug
package queue
import (
"bytes"
"io/ioutil"
"log"
"net/http"
@nabeken
nabeken / gist:ba4687a72e3cc9c33c2f
Created January 1, 2015 08:49
xml vs map in Go
package main
import "fmt"
import "encoding/xml"
// IdentityDkimAttributes is undocumented.
type IdentityDkimAttributes struct {
DkimEnabled bool `query:"DkimEnabled" xml:"DkimEnabled"`
DkimTokens []string `query:"DkimTokens.member" xml:"DkimTokens>member"`
DkimVerificationStatus string `query:"DkimVerificationStatus" xml:"DkimVerificationStatus"`