Skip to content

Instantly share code, notes, and snippets.

View lichengwu's full-sized avatar

Oliver Lee lichengwu

View GitHub Profile
@lichengwu
lichengwu / G1LogUtil.py
Created December 21, 2012 16:20
Garbage First Log Analyse Util
# coding=utf-8
__author__ = 'lichengwu'
import datetime
import re
'''
Garbage First Log Analyse Util
'''
@lichengwu
lichengwu / jvm.cfg
Created December 21, 2012 16:19
my jvm command line options
-server
-Xverify:none
-Xmn512m
-Xms1024m
-Xmx1024m
-Xss1m
-XX:PermSize=256
-XX:MaxPermSize=384m
-XX:+UseG1GC
-XX:MaxGCPauseMillis=300
@lichengwu
lichengwu / delete.bat
Created November 11, 2012 08:03
win7/win8强制删除文件夹
@echo off
set /p path=path:
set /p user=user:
rem 我们需要修改文件或目录的所有者
takeown /F %path% /R
rem 给用户授权文件夹或文件的完全控制权限
@lichengwu
lichengwu / default.vcl
Created September 28, 2012 00:35
intranet cache config
#This is a basic VCL configuration file for varnish. See the vcl(7)
#man page for details on VCL syntax and semantics.
#
#Default backend definition. Set this to point to your content
#server.
#
backend default {
.host = "hostname1.com";
#.host = "meituan.com";
#.host = "debug.ct.dev.sankuai.com";
@lichengwu
lichengwu / generic type erased
Created September 14, 2012 05:20
when will generic type be erased
when you declare generic type, you can get it. when you use generic type, it will be erased. eg:
public class Generics {
public <T> T m1(T object){
return object;
}
public void m2(){
List<Integer> list = new ArrayList<Integer>();
list.add(1);
@lichengwu
lichengwu / view_jvm_commandline_flags
Created July 3, 2012 00:38
about jvm command line flags
#list all changed flags
-XX:+PrintCommandLineFlags
#list all changeable flags and final default values
-XX:+PrintFlagsFinal
#list all changeable flags and initial default values
-XX:+PrintFlagsInitial
eg:
/*
* Copyright (c) 2010-2011 lichengwu
* All rights reserved.
*
*/
package oliver.test.sync;
import java.util.concurrent.TimeUnit;
import org.junit.Test;
@lichengwu
lichengwu / Crash.java
Created June 2, 2012 15:25
diff Xss & ThreadStackSize
import java.util.concurrent.TimeUnit;
import sun.dc.pr.PathDasher;
public class Crash {
public static void main(String[] args) {
Thread thread = new Thread(new Runnable() {
@Override
public void run() {