Skip to content

Instantly share code, notes, and snippets.

View zwxbest's full-sized avatar

Rey Kempster zwxbest

View GitHub Profile
package util;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.zip.CRC32;
import org.flywaydb.core.api.FlywayException;
import org.flywaydb.core.internal.util.scanner.Resource;
import org.flywaydb.core.internal.util.scanner.filesystem.FileSystemResource;
@zwxbest
zwxbest / font.java
Created May 28, 2019 10:23
font-family
package com.rmb.marketing.test;
import java.awt.*;
/**
* @author zhangweixiao
*/
public class Main {
public static void main(String[] args) {
package com.rmb.marketing.test;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/**
* @author zhangweixiao - 19-4-24
*/
public class Command {
public static void exeCmd(String commandStr) {
@zwxbest
zwxbest / nginx
Created March 10, 2019 13:07
docker-compose
nizouba_nginx:
image: nginx:1.11.6-alpine
command:
- /bin/sh
- -c
- |
mkdir -p /usr/local/upload/es-test
nginx -g 'daemon off;'
ports:
@zwxbest
zwxbest / copy.sh
Last active March 21, 2019 03:39
shell脚本
#!/bin/bash
# 不存在则建立
set -x
rm -rf test/
testName=test
test -e ${testName} && echo "${testName} exist" || mkdir test
for dir in *
do
if test -d $dir/src/test
then
@zwxbest
zwxbest / CheckSum.java
Created February 22, 2019 04:31
flyway
package util;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.StringReader;
import java.util.zip.CRC32;
import org.flywaydb.core.api.FlywayException;
import org.flywaydb.core.internal.util.scanner.Resource;
import org.flywaydb.core.internal.util.scanner.filesystem.FileSystemResource;
@zwxbest
zwxbest / groupby1.java
Last active March 7, 2019 14:50
lambda
package com;
import com.google.common.collect.Lists;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static java.util.stream.Collectors.*;
@zwxbest
zwxbest / 求最大值
Created January 31, 2019 08:38
lambda
// Map<Long, Float> collect = recipeTemplates.stream()
// .collect(Collectors.groupingBy(RecipeTemplate::getRecipeCode,
// Collectors.mapping(RecipeTemplate::getVersion, Collectors
// .collectingAndThen(Collectors.maxBy(Float::compare),
// Optional::get))));
@zwxbest
zwxbest / a.js
Created November 24, 2018 10:19
我爱听书油猴脚本
// ==UserScript==
// @name 下载有声电子书
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://*.xmcdn.com/**
// @match http://kting.info/**
// @match http://wting.info/**
// @match http://mting.info/**
ribbon:
OkToRetryOnAllOperations: true #是否所有请求都采用retry机制
ReadTimeout: 500000 #请求处理的超时时间
ConnectTimeout: 500000 #请求连接的超时时间
MaxAutoRetries: 1 #对当前实例的重试次数
MaxAutoRetriesNextServer: 2 #切换实例的重试次数
eureka:
enabled: true #是否采用eureka列表清单