Skip to content

Instantly share code, notes, and snippets.

View ligangty's full-sized avatar

Gang Li ligangty

  • Red Hat
  • China, Beijing
View GitHub Profile
@ligangty
ligangty / 1_simple.go
Created October 26, 2020 01:12 — forked from sosedoff/1_simple.go
Golang Custom Struct Tags Example
package main
import (
"fmt"
"reflect"
)
// Name of the struct tag used in examples
const tagName = "validate"
@ligangty
ligangty / gist:18c9200a189da3caa3979bfcc2c191e7
Created August 13, 2019 07:51
Sample code to change logback loglevel in runtime
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.LoggerContext;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
import java.util.List;
public class LogUtils
{
private final static List VALID_LEVELS = Arrays.asList( "TRACE", "DEBUG", "INFO", "WARN", "ERROR" );
@ligangty
ligangty / graphite.md
Created August 13, 2018 08:12 — forked from ashrithr/graphite.md
Installing graphite 0.10, collectd and grafana on centos 6

Installing Graphite:

Graphite does two things:

  1. Store numeric time-series data
  2. Render graphs of this data on demand

What Graphite does not do is collect data for you, however there are some tools out there that know