This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git remote add origin https://github.com/holysky5/abc.git | |
git branch -M main | |
git push -u origin main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"regexp" | |
"time" | |
"unicode" | |
"unicode/utf8" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 1 构建一个retry | |
``` | |
Retry<?> retryOptimisticLockException = Retry.anyOf(OptimisticLockingException.class) | |
.retryMax(10) | |
.doOnRetry(ctx -> log.debug( | |
"Retrying after OptimisticLockingException", | |
ctx.exception() | |
)); | |
// usage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.cgdon.jtexttable; | |
import java.util.Arrays; | |
/** | |
* @Kael cgdon@163.com | |
*/ | |
public class TextTable { | |
public final static String SEP = "\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://gitee.com/sunchenbin/Mybatis_BuildTable_V0.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Collection; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Set; | |
import java.util.concurrent.CopyOnWriteArrayList; | |
import java.util.concurrent.TimeUnit; | |
import org.apache.commons.collections.CollectionUtils; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 注意 --delete 后面不要的目录不要加* 否则会导致只删除 $sn_siteapi_src 子目录下的文件 | |
rsync -a --delete $sn_siteapi_src $app_srv1:/home/app_liking/apache-tomcat-7.0.82_1/webapps | |
if [ "$?" -ne "0" ] | |
then | |
echo 'rsync eror' | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Retries a command on failure. | |
# $1 - the max number of attempts | |
# $2... - the command to run | |
retry() { | |
local -r -i max_attempts="$1"; shift | |
local -r cmd="$@" | |
local -i attempt_num=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.akc.util.mongo; | |
import org.aspectj.lang.ProceedingJoinPoint; | |
import org.aspectj.lang.annotation.Around; | |
import org.aspectj.lang.annotation.Aspect; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.dao.DataAccessResourceFailureException; | |
import org.springframework.data.mongodb.UncategorizedMongoDbException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cz.blindspot.armorway.analytics.configuration; | |
import com.fasterxml.jackson.core.JsonParser; | |
import com.fasterxml.jackson.core.JsonProcessingException; | |
import com.fasterxml.jackson.core.TreeNode; | |
import com.fasterxml.jackson.databind.DeserializationContext; | |
import com.fasterxml.jackson.databind.JsonDeserializer; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.databind.module.SimpleModule; | |
import com.mongodb.*; |
NewerOlder