Skip to content

Instantly share code, notes, and snippets.

@yfuruyama
yfuruyama / create_assertion.go
Last active February 9, 2020 01:25
Create assertion for GCP Service Account: Usage `go build create_assertion.go && ./create_assertion <SERVICE_ACCOUNT_KEY.json>`
package main
import (
"crypto"
"crypto/rand"
"crypto/rsa"
"crypto/sha256"
"crypto/x509"
"encoding/base64"
"encoding/json"
@salrashid123
salrashid123 / iamcredentials.py
Created July 1, 2018 18:52
GCP impersonation with IAMCredentials
#!/usr/bin/python
# https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials
import logging
import os
import sys
import json
import time
import pprint
@pottava
pottava / prep-container-engine-for-prod.md
Last active August 26, 2020 09:37
本番環境のための GKE 構築 Tips

プロジェクト・ネットワーク・クラスタの構成

プロジェクト

  • GCP のすべてのリソースは プロジェクト の下に作成される
  • プロジェクトごとに請求や IAM の管理が可能
  • 本番やステージングといった複数環境のリソースを分離するためにもプロジェクトで分けよう
@MisaKondo
MisaKondo / gcp_2016_advent-calendar_1.md
Last active May 29, 2023 00:43
TerraformによるGCP環境の管理

この記事はGoogle Cloud Platform(1) Advent Calendar 2016の3日目となります!

Google Cloud Platform(以下、GCP)のサービスも一部はTokyoにようやくRegionが来たことだし、そろそろ利用してみたいと思った人も多いのではないでしょうか。 今回は、Google Compute Engine(以下、GCE)をTerraformを利用して構成管理をしてみます。

特に意味はないですが、気づいたら文字ばかりだったので、下記に今回利用するサービスのロゴを載せます。

GCP Terraform
gcp terraform

Best practices for building Vim plugins

2016-11-05 VimConf 2016

@hayajo
hayajo / .gitignore
Last active December 5, 2018 01:03
「GoでくつるLinuxコンテナ」 - 第10回 コンテナ型仮想化の情報交換会@東京 #lxcjp
.vagrant/
@rimusz
rimusz / preemtible_kubernetes.md
Last active July 7, 2018 02:52 — forked from tsuri/preemtible_kubernetes.md
kubernetes cluster w/ pre-emptible instances

Kubernetes clusters using preemtible instances

Motivation

People experimenting with kubernetes clusters on the GKE not necessarily have money to keep a full cluster on at all time. GKE clusters can be easily resized, but this still incurs in the full instance cost when the cluster is up.

Google has added preemptible instances that are ideal for many

@bitwalker
bitwalker / config.ex
Created July 19, 2016 23:00
Useful config wrapper for Elixir
defmodule Config do
@moduledoc """
This module handles fetching values from the config with some additional niceties
"""
@doc """
Fetches a value from the config, or from the environment if {:system, "VAR"}
is provided.
An optional default value can be provided if desired.
@fredbenenson
fredbenenson / kickstarter_sql_style_guide.md
Last active June 24, 2024 03:28
Kickstarter SQL Style Guide
layout title description tags
default
SQL Style Guide
A guide to writing clean, clear, and consistent SQL.
data
process

Purpose