Skip to content

Instantly share code, notes, and snippets.

@yongchun
yongchun / btrace.txt
Created October 9, 2015 01:35 — forked from melin/btrace.txt
btrace script
/* BTrace Script Template */
import com.sun.btrace.annotations.*;
import static com.sun.btrace.BTraceUtils.*;
import java.lang.reflect.Field;
@BTrace
public class TracingScript {
/*
* 获取方参数、返回值信息;获取方法调用时间
@yongchun
yongchun / limits.conf
Last active August 29, 2015 14:13 — forked from cuixin/limits.conf
#/etc/security/limits.conf
* hard nofile 1024000
* soft nofile 1024000
root hard nofile 1024000
root soft nofile 1024000
2014-11-02 16:10:49,120 - vst_passport - DEBUG [org.springframework.jdbc.support.SQLErrorCodesFactory] - <Database product name cached for DataSource [org.apache.commons.dbcp.BasicDataSource@70dd8904]: name is 'Oracle'>
2014-11-02 16:10:49,120 - vst_passport - DEBUG [org.springframework.jdbc.support.SQLErrorCodesFactory] - <SQL error codes for 'Oracle' found>
2014-11-02 16:10:49,121 - vst_passport - DEBUG [org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator] - <Translating SQLException with SQL state '23000', error code '1', message [ORA-00001: unique constraint (LVMAMA_VER.SYS_C0015594) violated
]; SQL was [] for task [
### Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constrain
@yongchun
yongchun / MapHelper.java
Last active August 29, 2015 14:06
map的简单工具类
/**
* A bunch of utility methods for working with maps
*
*
*/
public final class MapHelper {
private MapHelper() {
}
@yongchun
yongchun / gist:b2b09f9529c952b143f4
Last active August 29, 2015 14:03
deploy_error
To https://github.com/yongchun/yongchun.github.com.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/yongchun/yongchun.github.com.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
.highlight, html .gist .gist-file .gist-syntax .gist-highlight {
table td.code { width: 100%; }
border: 1px solid $pre-border !important;
}
.highlight .line-numbers, html .gist .gist-file .gist-syntax .highlight .line_numbers {
text-align: right;
font-size: 13px;
line-height: 1.45em;
@if $solarized == light {
background: lighten($base03, 1) $noise-bg !important;
rake new_post[‘article name’] 生成博文框架然后修改生成的文件即可
rake generate 生成静态文件
rake watch 检测文件变化实时生成新内容
rake preview 在本机4000端口生成访问内容
rake deploy 发布文件
{method}
- klass: {other class}
- this oop: 0x00000000bc925718
- method holder: 'StopThread$1'
- constants: 0x00000000bc925430 constant pool [29] for 'StopThread$1' cache=0x00000000bc925a90
- access: 0xc1000001 public
- name: 'run'
- signature: '()V'
- max stack: 1
- max locals: 2
@yongchun
yongchun / gist:8936244
Created February 11, 2014 14:51
java正则简单用列
package com.simple.example;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* java正则工作中的使用
* ==========================================
* ^A匹配以A开头
* $A匹配以A结尾
@yongchun
yongchun / ClassProperty2KeyUtil.java
Created January 8, 2014 02:00
自动化测试原型
package com.snda.sysdev.util;
import com.snda.sysdev.template.bean.InterfaceFuncParam;
import org.springframework.beans.BeanUtils;
import sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl;
import java.beans.PropertyDescriptor;
import java.lang.reflect.*;
import java.util.ArrayList;
import java.util.Collection;