Skip to content

Instantly share code, notes, and snippets.

View phosae's full-sized avatar
:octocat:
coffee ☕ , beer 🍺 and imagination 🧿

zengxu phosae

:octocat:
coffee ☕ , beer 🍺 and imagination 🧿
View GitHub Profile
@phosae
phosae / ctr_set_maxprocs.go
Last active December 30, 2022 09:36
using uber automaxprocs to set GOMAXPROCS correctly in container context
package main
import (
"fmt"
"runtime"
"go.uber.org/automaxprocs/maxprocs"
)
func main() {
@phosae
phosae / OkHttpUtils.java
Last active February 17, 2023 03:50
treenity
package dev.zeng.util;
import okhttp3.*;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
public class OkHttpUtils {
private static volatile OkHttpClient okHttpClient = null;