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.lang.annotation.ElementType; | |
| import java.lang.annotation.Retention; | |
| import java.lang.annotation.RetentionPolicy; | |
| import java.lang.annotation.Target; | |
| import java.util.concurrent.TimeUnit; | |
| @Retention(RetentionPolicy.RUNTIME) | |
| @Target(ElementType.METHOD) | |
| public @interface DistributedLock { |
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
| spring.datasource.url=jdbc:hsqldb:mem:testdb;sql.syntax_pgs=true |
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 com.fasterxml.jackson.databind.AnnotationIntrospector; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair; | |
| public final class LoggingObjectMapper extends ObjectMapper { | |
| private static final long serialVersionUID = -1620079742091329228L; | |
| public LoggingObjectMapper() { | |
| super(); |
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
| grep "search text" filename.txt | sort | uniq |
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 ...configuration; | |
| import org.springframework.context.annotation.Configuration; | |
| import org.springframework.context.annotation.Profile; | |
| import org.springframework.scheduling.annotation.EnableAsync; | |
| @Configuration | |
| @EnableAsync | |
| @Profile("!test") | |
| public class AsyncConfiguration { |
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
| siege -c50 -t5S -H 'Content-Type: application/json' -H 'access-token: ...' 'http://localhost:8080/... POST {"...": "...", ...}' |
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
| du -a . | sort -n -r | head -n 10 |
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
| cat file1 file2 ... fileN | grep "<SEARCHING TEXT>" | awk -F'<DELIMETER>' '{print $1 $2 ... $n;}' | sort | uniq |
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 ...; | |
| import org.springframework.beans.factory.annotation.Value; | |
| import org.springframework.core.io.Resource; | |
| import org.springframework.stereotype.Service; | |
| import java.io.InputStream; | |
| @Service | |
| public class SomeSpringBeanThatNeedsAResource { |
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
| # export | |
| PGPASSWORD="<PASSWORD>" pg_dump -U <USERNAME> -h <HOST> -d <DB_NAME> -n <SCHEMA_NAME> > export.sql | |
| # import | |
| PGPASSWORD="<PASSWORD>" psql -U <USERNAME> -h <HOST> -d <DB_NAME> -n <SCHEMA_NAME> -f export.sql |