Skip to content

Instantly share code, notes, and snippets.

Hidetake Iwata int128

Block or report user

Report or block int128

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
int128 /
Last active Jan 12, 2020
Spring Web filter for logging request and response
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.filter.OncePerRequestFilter;
import org.springframework.web.util.ContentCachingRequestWrapper;
import org.springframework.web.util.ContentCachingResponseWrapper;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
int128 / Dockerfile
Last active Jan 10, 2020
GitHub Actions to build and push a Docker image to GitHub Packages Registry
View Dockerfile
FROM alpine:3.11
#TODO: add steps
int128 /
Last active Jan 9, 2020
Watching build mode on Create React App

Create React App does not provide watching build mode oficially (#1070).

This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.

How to Use

Create a React app.

Put the script into scripts/watch.js.

int128 /
Last active Dec 27, 2019
Transparent proxy for Docker containers

Transparent proxy for Docker containers

If the Docker host is placed inside a proxy server, it needs to add the proxy configuration to each Dockerfile such as ENV http_proxy.

Following allows transparent access from the container to outside without any proxy configuration.

  1. Set up the transparent proxy
  2. Apply iptables rule for the transparent proxy
int128 /
Created Jun 22, 2018
GitLab SAML SSO with Keycloak

GitLab SAML SSO with Keycloak


  1. Open your Keycloak realm.
  2. Import keycloak-gitlab.json.
  3. Fix URLs of the client.


int128 /
Created Aug 16, 2019
Typical arguments of kube-apiserver built by kops on aws
mkfifo /tmp/pipe;
(tee -a /var/log/kube-apiserver.log < /tmp/pipe & ) ;
exec /usr/local/bin/kube-apiserver
int128 /
Last active Jun 28, 2019
How to use Ruby on Cygwin

How to use Ruby on Cygwin

It is strongly recommended to run on Linux or OS X. Maybe many problems will happen.


  • Cygwin
  • apt-cyg
  • http_proxy is set if needed
int128 / script.groovy
Created Mar 20, 2019
Create a ZIP/JAR file in Groovy
View script.groovy
* Create a ZIP/JAR file with given contents.
* @param destination destination file
* @param contents map of filename and content
void createZIP(File destination, Map<String, String> contents) {
destination.withOutputStream {
new ZipOutputStream(it).withStream { zip ->
contents.each { filename, content ->
int128 / kubernetes-dashboard-proxy.yaml
Last active Oct 3, 2018
Access Kubernetes Dashboard via OpenID Connect Proxy
View kubernetes-dashboard-proxy.yaml
apiVersion: extensions/v1beta1
kind: Deployment
name: kubernetes-dashboard-proxy
namespace: kube-system
replicas: 1
int128 / client.go
Created Aug 24, 2018
HTTPS client with CA certificate in Go
View client.go
package main
import (
You can’t perform that action at this time.