Skip to content

Instantly share code, notes, and snippets.

Henry Yan henryyan

Block or report user

Report or block henryyan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@henryyan
henryyan / debug-flow.json
Created Mar 5, 2016
Debug Flow JSON Data
View debug-flow.json
{
"flows": {
"init.venue": {
"cost": 43,
"id": 4,
"name": "init.venue",
"start": 1457176889218,
"startTime": "03/05/16 19:21:29.218",
"subThread": false,
"threadName": "http-apr-7001-exec-2"
@henryyan
henryyan / install-tengine
Created May 8, 2015
安装tengine和lua\cjson
View install-tengine
sudo yum -y install pcre-devel openssl openssl-devel
# tengine base
wget http://tengine.taobao.org/download/tengine-2.1.0.tar.gz
tar xzvf tengine-2.1.0.tar.gz
# install tengine
./configure
make
sudo make install
@henryyan
henryyan / gist:0c807e7809257fac6f84
Created Jan 5, 2015
遍历流程文件的元素
View gist:0c807e7809257fac6f84
// 从classpath中获取
InputStream inputStream = getClass().getClassLoader().getResourceAsStream("chapter6/dynamic-form/leave.bpmn");
// 创建转换对象
BpmnXMLConverter converter = new BpmnXMLConverter();
// 创建XMLStreamReader读取XML资源
XMLInputFactory factory = XMLInputFactory.newInstance();
XMLStreamReader reader = factory.createXMLStreamReader(inputStream);
@henryyan
henryyan / gist:5c3aa37f5e9d4fa217ca
Last active Jul 3, 2016
auto resize jqgrid width and height
View gist:5c3aa37f5e9d4fa217ca
/**
* 改变窗口大小的时候自动根据iframe大小设置jqGrid列表宽度和高度
* 参数说明:{
* enableAutoResize : 是否开启自动高度和宽度调整开关
* dataGrid : jqGrid数据列表的ID
* callback : 计算完dataGrid需要的高度和宽度后的回调函数
* width : 默认为iframe的宽度,如果指定则设置为指定的宽度
* height : 默认为iframe的高度,如果指定则设置为指定的高度
* beforeAutoResize : 窗口大小调整时自动设置之前
* afterAutoResize : 窗口大小调整时自动设置之后
@henryyan
henryyan / gist:7dc68040255838247ac5
Last active Aug 29, 2015
JBoss中访问Activiti Rest模块报错
View gist:7dc68040255838247ac5
15:56:59,105 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/wp-rest]] (http--127.0.0.1-8080-6) StandardWrapper.Throwable: java.lang.NoClassDefFoundError: com/sun/net/httpserver/HttpHandler
at org.restlet.engine.Engine.registerDefaultConnectors(Engine.java:736) [org.restlet-2.2.1.jar:]
at org.restlet.engine.Engine.discoverConnectors(Engine.java:553) [org.restlet-2.2.1.jar:]
at org.restlet.engine.Engine.<init>(Engine.java:386) [org.restlet-2.2.1.jar:]
at org.restlet.engine.Engine.register(Engine.java:308) [org.restlet-2.2.1.jar:]
at org.restlet.engine.Engine.register(Engine.java:297) [org.restlet-2.2.1.jar:]
at org.restlet.engine.Engine.getInstance(Engine.java:206) [org.restlet-2.2.1.jar:]
at org.restlet.engine.Engine.getLogger(Engine.java:262) [org.restlet-2.2.1.jar:]
at org.restlet.Context.<init>(Context.java:167) [org.restlet-2.2.1.jar:]
at org.restlet.Context.<init>(Context.java:139) [org.restlet-2.2.1.jar:]
@henryyan
henryyan / gist:9541147
Created Mar 14, 2014
nexus的nginx代理
View gist:9541147
server {
listen *:80;
server_name maven.kafeitu.me;
#客户端 header 请求超时时间
client_header_timeout 3m;
#客户端 内容 请求超时时间
client_body_timeout 3m;
#客户端发送请求超时时间 established 状态还没有发送回应
send_timeout 3m;
View gist:9363533
https://mapi.alipay.com/gateway.do?sign=965c2557f55afb9d51fb557f4cea3253&_input_charset=utf-8&total_fee=1&subject=%E7%9F%AD%E4%BF%A1&sign_type=MD5&service=create_direct_pay_by_user&notify_url=http%3A%2F%2Fwww.xxx.com%2Fcreate_direct_pay_by_user-JAVA-UTF-8%2Fnotify_url.jsp&partner=2088111296332059&seller_email=m%40oldyu.com&out_trade_no=1111222&payment_type=1&show_url=http%3A%2F%2Fwww.kuaidx.com%2Fdetail%2F111.html&return_url=http%3A%2F%2Fwww.xxx.com%2Fcreate_direct_pay_by_user-JAVA-UTF-8%2Freturn_url.jsp
@henryyan
henryyan / gist:9264414
Created Feb 28, 2014
导出excel耗时
View gist:9264414
create row: 2, time= 0ms
create row: 3, time= 50ms
create row: 4, time= 16ms
create row: 5, time= 20ms
create row: 6, time= 27ms
create row: 7, time= 35ms
create row: 8, time= 40ms
create row: 9, time= 45ms
create row: 10, time= 48ms
create row: 11, time= 56ms
View ExportExcel.java
package com.runchain.arch.util.export;
import java.io.FileOutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang.ObjectUtils;
@henryyan
henryyan / gist:9264128
Created Feb 28, 2014
poi导出excel耗时记录
View gist:9264128
create row: 2, time=10:32:50:185
create row: 3, time=10:32:50:232
create row: 4, time=10:32:50:257
create row: 5, time=10:32:50:279
create row: 6, time=10:32:50:309
create row: 7, time=10:32:50:341
create row: 8, time=10:32:50:381
create row: 9, time=10:32:50:429
create row: 10, time=10:32:50:476
create row: 11, time=10:32:50:529
You can’t perform that action at this time.