Skip to content

Instantly share code, notes, and snippets.

View mengjiann's full-sized avatar
🤔
code. code.

MJ mengjiann

🤔
code. code.
  • Illumina
  • Singapore
View GitHub Profile
# Spring cli init
spring init --artifactId demo --groupId com.mj --name demo --package-name com.mj.demo --dependencies web,lombok
# Maven quick start
mvn archetype:generate -DgroupId=com.mj -DartifactId=demo -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
# Get grep output from kubectl get pod and run with command
kgp | grep nginx | awk '{print $1 " sh"}' | xargs -o kubectl exec -it
# Docker related
@mengjiann
mengjiann / gitcom.md
Created December 5, 2018 16:33 — forked from jednano/gitcom.md
Common git commands in a day-to-day workflow

Git Cheat Sheet

Initial Setup

Create an empty git repo or reinitialize an existing one

$ git init
- .ignore
- lombok
- alibaba coding guidelines
- gsonformat
- maven helper
- rainbow brackets
References: https://www.jianshu.com/p/686ba0ae4ac2
Expression Utility Objects
Besides these basic objects, Thymeleaf will offer us a set of utility objects that will help us perform common tasks in our expressions.
#dates: utility methods for java.util.Date objects: formatting, component extraction, etc.
#calendars: analogous to #dates, but for java.util.Calendar objects.
#numbers: utility methods for formatting numeric objects.
#strings: utility methods for String objects: contains, startsWith, prepending/appending, etc.
#objects: utility methods for objects in general.
#bools: utility methods for boolean evaluation.
#arrays: utility methods for arrays.
@mengjiann
mengjiann / gist:cce8fee0bb5b443e8875853fc7e8ae08
Created March 27, 2018 14:22
spring-boot-cloud-feign-config
@Configuration
public class FeignClientConfig {
@Bean
Logger.Level feignLoggerLevel() {
return Logger.Level.FULL;
}
@Bean
public RequestInterceptor requestInterceptor(){