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 lombok.AllArgsConstructor; | |
| import lombok.Data; | |
| @Data | |
| @AllArgsConstructor | |
| public class LazyDeveloper { | |
| private String firstName; | |
| private String lastName; |
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 org.joda.time.DateTime; | |
| public class StartEndTimeWithJodaTime { | |
| private DateTime startTime; | |
| private DateTime endTime; | |
| public void process() { | |
| startTime = DateTime.now(); |
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
| public class ComparingUtils { | |
| public static <T extends Comparable<T>> ComparisonBuilder<T> is(T comparable) { | |
| return new ComparisonBuilder<>(comparable); | |
| } | |
| public static class ComparisonBuilder<T> { | |
| private Comparable<T> subject; |
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
| // Use HttpComponentsClientHttpRequestFactory to fix the issue | |
| import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; | |
| ... | |
| RestTemplate restTemplate = new RestTemplate(new HttpComponentsClientHttpRequestFactory()); |
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 | |
| # DESCRIPTION | |
| # ----------- | |
| # | |
| # Produces CSV output like this: | |
| # | |
| # LAST CHANGE TIME, TIME ELAPSED, AUTHOR, BRANCH | |
| # 2017-01-16 14:56:26 +0000, 3 months ago, [email protected], origin/bug-fix-1 | |
| # 2017-01-23 18:27:53 +0300, 2 months ago, [email protected], origin/new-feature-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
| #!/bin/bash | |
| # Run tests | |
| mvn clean test --fail-never | |
| # Print header | |
| echo | |
| echo "TEST NAME, TESTS COUNT, FAILURES COUNT, ERRORS COUNT, SKIPPED COUNT, TIME ELAPSED" | |
| # Prepare report |
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 | |
| python -m SimpleHTTPServer |
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 org.springframework.beans.BeansException; | |
| import org.springframework.context.ApplicationContext; | |
| import org.springframework.context.ApplicationContextAware; | |
| import org.springframework.stereotype.Component; | |
| @Component | |
| public class ApplicationContextHolder implements ApplicationContextAware { | |
| private static ApplicationContext applicationContext; |
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 org.apache.commons.collections4.CollectionUtils; | |
| import org.apache.commons.collections4.IteratorUtils; | |
| import org.apache.commons.lang3.StringUtils; | |
| import org.hibernate.query.criteria.internal.path.PluralAttributePath; | |
| import org.springframework.data.domain.Page; | |
| import org.springframework.data.domain.PageRequest; | |
| import org.springframework.data.repository.support.PageableExecutionUtils; | |
| import javax.persistence.EntityManager; | |
| import javax.persistence.TypedQuery; |
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 -v "sen gelme ulan ayı" |