Skip to content

Instantly share code, notes, and snippets.

Working from home

KUOKA Yusuke mumoshu

Working from home
Block or report user

Report or block mumoshu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mumoshu / main.go
Created Sep 9, 2018
httpserver in go for demo purpose
View main.go
package main
import (
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:])
View kubernetes-dashboard-minimal.rbac.yaml
apiVersion: v1
kind: Secret
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard-certs
namespace: kube-system
type: Opaque
View curl_teleport_webapi_ping_onelogin.log
$ curl -s -o /dev/null -w "%{http_code}" -v
* Trying
* Connected to ( port 3080 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
View teleport.log
$ k logs teleport-7ccdf686b8-dshfw
Original Error: *trace.BadParameterError unable to verify HTTPS certificate chain in /var/lib/certs/tls.crt: WARNING:
The proxy you are connecting to has presented a certificate signed by a
unknown authority. This is most likely due to either being presented
with a self-signed certificate or the certificate was truly signed by an
authority not known to the client.
mumoshu / 0-usage
Last active Mar 26, 2018
Runs an arbitrary command within a bash session in which a temporary ssh-agent is running
View 0-usage
$ DEBUG=1 ./ bash
Starting ssh-agent...
Started ssh-agent
Type path to ssh key. Blank to continue> /Users/example/.ssh/id_rsa
Identity added: /Users/example/.ssh/id_rsa (/Users/example/.ssh/id_rsa)
Type path to ssh key. Blank to continue>
bash-3.2$ ssh-add -l
4096 SHA256:PXeBU/YU3qFCpTIQvE5HHVwa8tnaftJzgNukHswTJrc /Users/example/.ssh/id_rsa (RSA)
bash-3.2$ exit
View ssm-agent.iam.json
"Version": "2012-10-17",
"Statement": [
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
View test.rb
#!/usr/bin/env ruby
require 'benchmark'
# global executorの並列度を高めにしてから...
def concurrent_download(files, future_provider: Concurrent::Future)
require 'concurrent/future'
# 最大20ファイルずつ並列ダウンロード
n = 20
mumoshu /
Created Mar 13, 2018
An example of secure, cacheful docker-multistage-build
if [ ! -z "$DEBUG" ]; then
set -vx
set -eu
if [ ! -z "${REGISTRY}" ]; then
mumoshu /
Created Feb 28, 2018
Since Docker version released Mar. 2017
sh -c 'image=mytestimage; FTP_PROXY=$(dd if=/dev/zero of=output.dat bs=180k count=1 && cat output.dat | base64); secret=$FTP_PROXY; docker build --build-arg FTP_PROXY=$secret -t $image . && ! docker inspect $image | grep $secret && ! docker history $image | grep $secret'
View cfn-signal.log
This file has been truncated, but you can view the full file.
-- Logs begin at Mon 2018-01-29 04:17:29 UTC, end at Mon 2018-01-29 04:27:22 UTC. --
Jan 29 04:20:06 ip-10-0-0-27.ap-northeast-1.compute.internal systemd[1]: Starting cfn-signal.service...
Jan 29 04:21:36 ip-10-0-0-27.ap-northeast-1.compute.internal systemd[1]: cfn-signal.service: Start-pre operation timed out. Terminating.
Jan 29 04:21:36 ip-10-0-0-27.ap-northeast-1.compute.internal bash[6257]: Unable to find image '' locally
Jan 29 04:21:39 ip-10-0-0-27.ap-northeast-1.compute.internal bash[6257]: v1.6.3: Pulling from calico/ctl
Jan 29 04:21:39 ip-10-0-0-27.ap-northeast-1.compute.internal bash[6257]: ab7e51e37a18: Pulling fs layer
Jan 29 04:21:39 ip-10-0-0-27.ap-northeast-1.compute.internal bash[6257]: 47ec95af9444: Pulling fs layer
Jan 29 04:21:39 ip-10-0-0-27.ap-northeast-1.compute.internal bash[6257]: ce9d0d78598b: Pulling fs layer
Jan 29 04:21:39 ip-10-0-0-27.ap-northeast-1.compute.internal bash[6257]: ffb36b374b13: Pulling fs layer
You can’t perform that action at this time.