Skip to content

Instantly share code, notes, and snippets.

View int128's full-sized avatar

Hidetake Iwata int128

View GitHub Profile
@int128
int128 / RequestAndResponseLoggingFilter.java
Last active January 13, 2024 10:46
Spring Web filter for logging request and response
/*
Copyright 2017 Hidetake Iwata
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@jasonblanchard
jasonblanchard / README.md
Last active July 1, 2022 00:19 — forked from int128/README.md
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.

@tk0miya
tk0miya / tk0miya-sponsors-2021.md
Last active September 23, 2021 13:25 — forked from melpon/wandbox-sponsors.md
@tk0miya のスポンサー募集

(For English readers: please read https://github.com/sponsors/tk0miya instead)

@tk0miya の企業・個人スポンサーを募集します

@tkomiya は、日本在住の OSS 開発者です。
趣味として Sphinxpycmarkblockdiag などの OSS の開発やメンテナンスに携わっています。

ここ数年の活動の中心は Sphinx です。 Sphinx は PythonLinux カーネルをはじめとして、数多くの OSS のドキュメントに利用されているドキュメンテーションツールです。 Sphinx プロジェクトはごく少人数のメンテナによって活動しており、(明確な役割として定義はされていないものの) リードメンテナ、メインメンテナとして活動しています。

@int128
int128 / README.md
Last active January 21, 2024 14:52
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.

@pascals-msft
pascals-msft / wsl-uninstall.txt
Created November 17, 2016 13:23
How to uninstall Windows Subsystem for Linux
In a privileged cmd.exe:
lxrun /uninstall /full
sc stop lxssmanager
rmdir /S %LOCALAPPDATA%\lxss
optionalfeatures.exe --> uncheck "Windows Subsystem for Linux (Beta)"
@josephspurrier
josephspurrier / addimport.go
Last active October 28, 2022 14:34
Add Import using ast in Go
// Source: https://gitlab.pro/googlesource/tools/blob/ae534bcb6ccdd13487d0491c2194d10ebcd30ff3/astutil/imports.go
// Source: https://golang.org/src/go/doc/example.go#L262
package main
import (
"bytes"
"fmt"
"go/ast"
"go/parser"
@xcsrz
xcsrz / server.go
Created January 2, 2016 07:12
A golang web server on a randomly (os) chosen port.
package main
import (
"fmt"
"github.com/skratchdot/open-golang/open"
"net"
"net/http"
)
func main() {

First you want some software. You know what you want, so it makes sense that it’s most convenient if the the software is built by yourself.

Unfortunately (or luckily) you’re too busy doing your own stuff to write a software. You call up someone and ask him to write the software for you. You save time and he got a job. Win-Win!

But wait. He needs to understand what you want. You need to tell the developer what you want. You need communication. One of the problems of communication is you cannot tell if you successfully communicated. You ask something. The only way to see if your request is communicated right is to see the resulting product. The developer show the product as a proof of the communication.

Time is money. If it proves wrong after several months, ah-oh. It’s wasted time. You don’t want to waste time or money. You want to see the proof early, as early as possible. So the developer wants to, for the sake of a satisfied customer, create only a small chunk of software and show it to yo

@jamesrr39
jamesrr39 / Golang program stdin stdout interaction.md
Last active July 12, 2023 18:21
Using stdout and stdin from other programs in Golang

Go program interaction

Example of how to use stdout and stdin from other programs in golang

Requires go

Run

go run parentprocess.go
@chinshr
chinshr / Jenkinsfile
Last active October 16, 2023 09:25
Best of Jenkinsfile, a collection of useful workflow scripts ready to be copied into your Jenkinsfile on a per use basis.
#!groovy
# Best of Jenkinsfile
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins
node {
}