Skip to content

Instantly share code, notes, and snippets.

View evil0th's full-sized avatar
🏠
Looking for a telework

Eric evil0th

🏠
Looking for a telework
View GitHub Profile
@evil0th
evil0th / LetterAvatars.html
Created March 19, 2019 02:59
Letter Avatars Generate
<!DOCTYPE html>
<html>
<head>
<title>Letter Avatars</title>
</head>
<style type="text/css">
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
pre {
@evil0th
evil0th / ThreadTest.java
Last active February 13, 2019 03:25
多线程测试代码
import org.junit.Test;
import java.util.concurrent.*;
import java.util.function.Supplier;
public class ThreadTest {
private static final ScheduledExecutorService schedulerExecutor =
Executors.newScheduledThreadPool(10);
@evil0th
evil0th / log4j2.xml
Last active November 24, 2023 09:52
Log4j2配置(控制台颜色参照springboot配置)
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="OFF">
<Properties>
<Property name="LOG_HOME">${sys:user.home}/logs</Property>
<!--<Property name="LOG_HOME">../logs</Property>-->
<!--<Property name="PATTERN">[%date{DEFAULT}] [%thread] [%-5level] TC:%x %logger{1.}.%method:%line - %msg%xEx%n</Property>-->
<Property name="LOG_EXCEPTION_CONVERSION_WORD">%xEx</Property>
<Property name="LOG_LEVEL_PATTERN">%5p</Property>
<Property name="LOG_DATEFORMAT_PATTERN">yyyy-MM-dd HH:mm:ss.SSS</Property>
<!--<Property name="CONSOLE_LOG_PATTERN">%clr{%d{${LOG_DATEFORMAT_PATTERN}}}{faint} %clr{${LOG_LEVEL_PATTERN}} %clr{${sys:PID}}{magenta} %clr{-&#45;&#45;}{faint} %clr{[%15.15t]}{faint} %clr{%-40.40c{1.}}{cyan} %clr{:}{faint} %m%n${sys:LOG_EXCEPTION_CONVERSION_WORD}</Property>-->
@evil0th
evil0th / LRULinkedHashMap.java
Created March 24, 2018 09:07
利用LinkedHashMap实现简单的缓存
package com.github.liaow.component;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/**
@evil0th
evil0th / SoapClient.java
Last active November 19, 2018 04:06
SOAP工具类
package com.github.liaow.soap.util;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.copote.nstamp.expection.BaseException;
import com.eviware.soapui.impl.WsdlInterfaceFactory;
import com.eviware.soapui.impl.wsdl.*;
import com.eviware.soapui.impl.wsdl.support.soap.SoapMessageBuilder;
import com.eviware.soapui.support.XmlHolder;