Skip to content

Instantly share code, notes, and snippets.

View strongme's full-sized avatar
🏠
Working from home

Shiwei Yang strongme

🏠
Working from home
View GitHub Profile
@strongme
strongme / docker-api-port.md
Created July 8, 2021 13:14 — forked from styblope/docker-api-port.md
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
@strongme
strongme / gist:b22128d9d66bc09ac60f00bfcc4ffc2a
Created April 30, 2019 09:04
Vue DHTML GRID Custom Column Type Now Working
<template>
<div ref="container" class="widget-box"></div>
</template>
<script>
import fromCDN from "from-cdn";
function eXcell_myprice(cell){ //the eXcell name is defined here
if (cell){ //the default pattern, just copy it
this.cell = cell;
package com.bettem.mp.flowable;
import com.bettem.mp.flowable.taskListener.common.BTaskListener;
import lombok.extern.slf4j.Slf4j;
import org.flowable.task.service.delegate.DelegateTask;
/**
* description:
* email: <a href="strongwalter2014@gmail.com">阿水</a>
*
package com.bettem.mp.flowable;
import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.JavaDelegate;
/**
* description:
* email: <a href="strongwalter2014@gmail.com">阿水</a>
*
@Deployment(resources = {"processes/测试撤回功能.bpmn20.xml"})
public void testProcessRollback() {
ProcessInstance instance = runtimeService.startProcessInstanceByKey("test-rollback");
log.info("ProcessInstance Id : {}, Id: {}", instance.getProcessInstanceId(), instance.getProcessInstanceId());
String processInstanceId = instance.getProcessInstanceId();
//发起会议
Task task = taskService.createTaskQuery().processInstanceId(processInstanceId).taskDefinitionKey("startMeeting").active().singleResult();
List<String> userList = Lists.newArrayList("userA", "userB", "userC");
Map<String, Object> params = Maps.newHashMap();
@strongme
strongme / bpmn-rollback
Created March 26, 2019 15:42
flowable bpmn change state test
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.flowable.org/processdef">
<process id="test-rollback" name="测试撤回功能" isExecutable="true">
<startEvent id="start" name="开始"></startEvent>
<userTask id="startMeeting" name="发起会议"></userTask>
<sequenceFlow id="sid-09F754DD-80A3-4A65-8CC7-9AF7118E78E9" sourceRef="start" targetRef="startMeeting"></sequenceFlow>
<userTask id="submitOpinion" name="发表意见" flowable:assignee="${assignee}">
<extensionElements>
<flowable:taskListener event="complete" class="com.bettem.
@strongme
strongme / microservices.md
Last active April 10, 2018 02:31
微服务技能图谱

微服务架构 技能图谱

理论基础

概念

多微合适

  • 非代码函数
  • 非重写时间
  • 适合团队最重要
  • 独立业务属性
  • 全功能团队
@strongme
strongme / uuid15.java
Created September 4, 2017 09:43
UUID15位
public class UUID15 {
private final static String str = "1234567890abcdefghijklmnopqrstuvwxyz";
private final static int pixLen = str.length();
private static volatile int pixOne = 0;
private static volatile int pixTwo = 0;
@strongme
strongme / log
Created June 2, 2017 06:07
log detail
2017-06-02 11:54:33.845 INFO 28665 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry : Running the evict task with compensationTime 0ms
2017-06-02 11:55:33.850 INFO 28665 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry : Running the evict task with compensationTime 2ms
2017-06-02 11:56:33.855 INFO 28665 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry : Running the evict task with compensationTime 2ms
2017-06-02 11:57:33.861 INFO 28665 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry : Running the evict task with compensationTime 3ms
2017-06-02 11:58:33.865 INFO 28665 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry : Running the evict task with compensationTime 1ms
2017-06-02 11:59:33.871 INFO 28665 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry : Running the evict task with compensationTime 3ms
2017-06-02 12:00:33.878 INFO 28665 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry : Running the evict task