Skip to content

Instantly share code, notes, and snippets.

View dtan4's full-sized avatar

Daisuke Fujita dtan4

View GitHub Profile
package main
import (
"context"
"log"
"time"
"google.golang.org/api/iam/v1"
)
@dtan4
dtan4 / Dockerfile
Created September 2, 2018 10:30
Dockerfile for ruby-packer for Linux
FROM ubuntu:18.04
RUN apt-get update \
&& apt-get install -y \
bison \
curl \
gcc \
make \
pkg-config \
ruby \

Istio on Minikube

Requirements

  • Kubernetes 1.7.3 or newer w/ alpha features

The following instructions require you have access to a Kubernetes 1.7.3 or newer cluster with RBAC (Role-Based Access Control) enabled. You will also need kubectl 1.7.3 or newer installed. If you wish to enable automatic injection of sidecar, you need to turn on Kubernetes alpha features in your cluster.

Create Kubernetes cluster using Minikube

Keybase proof

I hereby claim:

  • I am dtan4 on github.
  • I am dtan4 (https://keybase.io/dtan4) on keybase.
  • I have a public key ASCwphq9PpJZoByPZgo-LQWCLrY5EVKyOAe4eu96lr0-Fwo

To claim this, I am signing this object:

client.describe_log_groups
client.describe_log_streams(log_group_name: "/aws/lambda/hello-world")
events = client.get_log_events(log_group_name: "/aws/lambda/hello-world", log_stream_name: "2015/11/06/[$LATEST]EXAMPLEf01b14a6d9588993a9EXAMPLE")
puts events.map(&:message).join
@dtan4
dtan4 / index.tmpl
Last active June 24, 2020 14:11
GitHub OAuth Login w/ gin
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>weboauth</title>
</head>
<body>
<h1>weboauth</h1>
{{ if .logged_in }}
@dtan4
dtan4 / pr.rb
Created April 13, 2016 06:36
Generate Pull Request list in Markdown list format
$ ./pr.rb wantedly/paus-frontend
- [#1 説明書きの変更](https://github.com/wantedly/paus-frontend/pull/1)
- [#2 Delete ssh/config](https://github.com/wantedly/paus-frontend/pull/2)
- [#3 Add tutorial](https://github.com/wantedly/paus-frontend/pull/3)
- [#4 Add message](https://github.com/wantedly/paus-frontend/pull/4)
- [#5 Add username](https://github.com/wantedly/paus-frontend/pull/5)
- [#6 URL一覧ページの追加](https://github.com/wantedly/paus-frontend/pull/6)
- [#7 UsernameでURLを絞り込めるようにした](https://github.com/wantedly/paus-frontend/pull/7)
- [#8 Fix typo](https://github.com/wantedly/paus-frontend/pull/8)
- [#9 Add target attribute](https://github.com/wantedly/paus-frontend/pull/9)
@dtan4
dtan4 / ping.md
Created November 12, 2015 04:36
Ping to ap-northeast-1 (Tokyo), ap-southeast-1 (Singapore) from Hong Kong

From

csl Wi-Fi Hot Spot in HKUST

Instance Spec

  • AMI: CoreOS beta 835.4.0
  • Type: t2.micro
  • Storage: 8GB gp2

Result

ap-northeast-1 (Tokyo)

#!/usr/bin/env ruby
require "fileutils"
require "open3"
def ghq_name_of(repository_url)
case repository_url
when %r(\Agit@)
repository_url.gsub(%r(\Agit@), "").sub(":", "/").gsub(%r(\.git\z), "")
when %r(\Agit://)

サーバにログインしない・させないサービス運用

  • @koid
    • 後方支援系エンジニア

Gunosy

  • 26 devs
    • 5 analysis + contents
    • 1 infra
  • API
  • golang