This file contains 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
mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file \ | |
-Dfile=<jar-file> \ | |
-DgroupId=<group> \ | |
-DartifactId=<artifact> \ | |
-Dversion=1.0 \ | |
-Dpackaging=jar \ | |
-DlocalRepositoryPath=${master_project}/local-maven-repo |
This file contains 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
certutil -hashfile yourfilenameaddress MD5 | |
certutil -hashfile yourfilenameaddress SHA1 | |
certutil -hashfile yourfilenameaddress SHA256 |
This file contains 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
@Configuration | |
@ComponentScan("com.example") | |
public class ExampleAutoConfiguration { | |
} |
This file contains 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
const EventEmitter = require('events') | |
class TaskQueue extends EventEmitter { | |
constructor(size) { | |
super() | |
this.size = size | |
this.jobs = new Set() | |
} | |
async push(task) { |
This file contains 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
const fs = require('fs') | |
const readline = require('readline') | |
const fileStream = fs.createReadStream('input.txt') | |
const rl = readline.createInterface({ | |
input: fileStream, | |
crlfDelay: Infinity | |
}) |
This file contains 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
const program = require('commander') | |
const path = require('path') | |
program | |
.requiredOption('-w, --workspace <dir>', '工作目录', (val) => path.resolve(__dirname, val)) | |
.option('-s, --size <size>', '最大并发上传数量', (val, def) => parseInt(val) || def, 10) | |
program.parse(process.argv) | |
const { |
This file contains 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
@Bean | |
public RouteLocator customRouteLocator(RouteLocatorBuilder builder) { | |
return builder.routes() | |
.route("path_route", r -> r.method(HttpMethod.GET).and().path("/mock/**") | |
.filters(f -> f.rewritePath("/mock/(?<segment>.*)", "/${segment}")) | |
.uri("https://6000221fcb21e10017af883f.mockapi.io/api/v1")) | |
.build(); | |
} |
This file contains 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
management: | |
endpoint: | |
health: | |
show-details: always | |
endpoints: | |
web: | |
exposure: | |
include: "*" |
This file contains 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
@Component | |
public class EndpointsListener implements ApplicationListener<ContextRefreshedEvent> { | |
@Override | |
public void onApplicationEvent(ContextRefreshedEvent event) { | |
ApplicationContext applicationContext = event.getApplicationContext(); | |
applicationContext.getBean(RequestMappingHandlerMapping.class).getHandlerMethods() | |
.forEach((requestMappingInfo, handlerMethod) -> { | |
Set<RequestMethod> methods = requestMappingInfo.getMethodsCondition().getMethods(); | |
Set<String> patterns = requestMappingInfo.getPatternsCondition().getPatterns(); |
This file contains 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
multielasticdump --input=http://127.0.0.1:9200 --output=. | |
multielasticdump --direction=load --input=. --output=http://127.0.0.1:9200 |
OlderNewer