Skip to content

Instantly share code, notes, and snippets.

View Nemo-G's full-sized avatar

Nemo Guan Nemo-G

  • Unity Technologies
  • Shanghai
View GitHub Profile
@Nemo-G
Nemo-G / bytePool.go
Created April 15, 2021 14:23
Using channel to keep a byte pool
package shared
import (
"bytes"
"io"
"math"
"math/bits"
)
// GlobalPool is a static Pool for reusing byteslices of various sizes.
@Nemo-G
Nemo-G / gin_prometheus.go
Created August 6, 2018 18:07
Prometheus wrapper for Gin
package middleware
import (
"bytes"
"fmt"
"github.com/gin-gonic/gin"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"io/ioutil"
"net/http"
goog.provide('wap.mobile.todo.util.SwipeEnhancePlugin');
goog.provide('wap.mobile.todo.util.SwipeEnhancePlugin.EventType');
goog.require('goog.asserts');
goog.require('goog.dom');
goog.require('goog.events');
goog.require('goog.events.EventTarget');
goog.require('goog.events.EventType');
goog.require('goog.fx.Transition.EventType');
goog.require('goog.fx.css3.Transition');