Skip to content

Instantly share code, notes, and snippets.

View 0532's full-sized avatar
🇨🇳

wanglichao 0532

🇨🇳
View GitHub Profile
@0532
0532 / giteio.properties
Last active October 20, 2021 11:41
giteio.properties
gate.io.query.url=https://data.gateio.ws
@0532
0532 / channel_v3.json
Created March 26, 2019 01:23
解决sublime text 3使用Install Package时出现There are no packages available for installation问题
This file has been truncated, but you can view the full file.
{"schema_version": "3.0.0", "repositories": ["https://bitbucket.org/jjones028/p4sublime/raw/tip/packages.json", "https://bitbucket.org/klorenz/sublime_packages/raw/tip/packages.json", "https://packagecontrol.io/packages_2.json", "https://packagecontrol.io/repository.json", "https://packages.monokai.pro/packages.json", "https://raw.githubusercontent.com/20Tauri/DoxyDoxygen/master/DoxyDoxygen.json", "https://raw.githubusercontent.com/Andr3as/Sublime-SurroundWith/master/packages.json", "https://raw.githubusercontent.com/FichteFoll/sublime_packages/master/package_control.json", "https://raw.githubusercontent.com/Floobits/floobits-sublime/master/packages.json", "https://raw.githubusercontent.com/Harrison-M/indent.txt-sublime/master/packages.json", "https://raw.githubusercontent.com/Hexenon/FoxCode/master/packages.json", "https://raw.githubusercontent.com/Kaizhi/SublimeUpdater/master/packages.json", "https://raw.githubusercontent.com/Kasoki/FancyProjects/master/packages.json", "https://raw.githubusercontent.com/Mat
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Queue;
import java.util.concurrent.*;
/**
* 线程池管理
*/
@0532
0532 / FingerPrintFeignconfig.java
Created January 9, 2019 03:32
feign请求copy 请求头,使用方法@FeignClient(url = "${feign.url.internal.securityService}", name = "deviceFingerPrintFeign" , configuration = FingerPrintFeignconfig.class)
@Configuration
public class FingerPrintFeignconfig implements RequestInterceptor {
private final Logger logger = LoggerFactory.getLogger(getClass());
@Override
public void apply(RequestTemplate template) {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder
.getRequestAttributes();
HttpServletRequest request = attributes.getRequest();
Enumeration<String> headerNames = request.getHeaderNames();
@0532
0532 / show-busy-java-threads.sh
Created December 21, 2018 04:35
显示当期服务器占用线程数 sh show-busy-java-threads.sh -p PID
#!/bin/bash
# @Function
# Find out the highest cpu consumed threads of java, and print the stack of these threads.
#
# @Usage
# $ ./show-busy-java-threads
#
# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/java.md#-show-busy-java-threads
# @author Jerry Lee (oldratlee at gmail dot com)
# @author superhj1987 (superhj1987 at 126 dot com)
@0532
0532 / AsyncAlertService.java
Created November 29, 2018 09:13
钉钉群预警
package com.doraemoney.wk.quotecheckplatform.service.support;
import com.alibaba.fastjson.JSONObject;
import org.asynchttpclient.AsyncHttpClient;
import org.asynchttpclient.DefaultAsyncHttpClient;
import org.asynchttpclient.DefaultAsyncHttpClientConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
@0532
0532 / ForkJoin.java
Created October 26, 2018 09:24
forkjoin多线程执行任务
package com.doraemoney.wk.quotecheckplatform.util;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.RecursiveAction;
import java.util.concurrent.TimeUnit;
/**
* created by wanglichao@163.com on 2018/10/26.
*/
public class PrintTask extends RecursiveAction{
@0532
0532 / jvm-tomcat.con
Created August 16, 2018 03:45
jvm tomcat 服务器配置
安装软件
jdk
jdk版本: jdk-8u171-linux-x64.tar.gz
#安装路径:
tar -zxf jdk-8u171-linux-x64.tar.gz
ln -s /app/java/jdk1.8.0_171 /app/java/default
#设置环境变量
vim ~/.bash_profile
@0532
0532 / git.alias
Last active November 18, 2021 12:48
git 命令常用别名,配置在.gitconfig文件下
[alias]
s = status
st = status
sb = status -s -b
#############
d = diff
di = diff
dc = diff --cached
dk = diff --check
dck = diff --cached --check
@0532
0532 / RecursiveTaskTest
Created May 26, 2017 08:49
fork/join多线程使用
package com.doraemoney.test.own;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.ForkJoinTask;
import java.util.concurrent.RecursiveTask;
import com.doraemoney.core.utils.ThreadPoolUtils;
/**
* Created By WangLichao On 2017年5月26日.