Skip to content

Instantly share code, notes, and snippets.

@tangrui
tangrui / deploy-jetty-for-cdeio-app-in-prod.md
Last active January 18, 2016 09:35
如何在生产环境下为 CDEIO 应用部署 Jetty 服务器

简介

本文主要介绍如何以域模式为 CDE.IO 应用部署 Jetty 服务器。截止到本文编写时,Jetty 的最新版本为 9.3.6.v20151106,以下所有内容均是基于此版本描述的。

开始

官方网站下载 Jetty 压缩包,并解压到某个本地目录,下文将此解压目录以 $JETTY_HOME 代替。

应用程序

@tangrui
tangrui / vimrc
Created June 29, 2013 04:29
My Vim config file.
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
if has("win32")
set runtimepath^=$HOME/.vim
endif
" #################### functions ####################
set diffexpr=MyDiff()
@tangrui
tangrui / gist:3779888
Created September 25, 2012 03:56
Find node instance by work item id
private WorkItemNodeInstance findNodeInstance(long workItemId, NodeInstanceContainer container) {
for (NodeInstance nodeInstance: container.getNodeInstances()) {
if (nodeInstance instanceof WorkItemNodeInstance) {
WorkItemNodeInstance workItemNodeInstance = (WorkItemNodeInstance) nodeInstance;
if (workItemNodeInstance.getWorkItem().getId() == workItemId) {
return workItemNodeInstance;
}
}
if (nodeInstance instanceof NodeInstanceContainer) {
WorkItemNodeInstance result = findNodeInstance(workItemId, ((NodeInstanceContainer) nodeInstance));