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 ComponentLoadProcessor{ | |
| @Override | |
| public | |
| void postProcessBeanDefinitionRegistry(final BeanDefinitionRegistry reg) | |
| throws BeansException { | |
| for (final String s : reg.getBeanDefinitionNames()) { | |
| final BeanDefinition bd = reg.getBeanDefinition(s); | |
| if (bd.getBeanClassName() != null && | |
| bd instanceof AnnotatedBeanDefinition) { | |
| final AnnotatedBeanDefinition ab = |
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 javax.sql.DataSource; | |
| import org.springframework.batch.core.Job; | |
| import org.springframework.batch.core.JobParameters; | |
| import org.springframework.batch.core.Step; | |
| import org.springframework.batch.core.StepContribution; | |
| import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing; | |
| import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; | |
| import org.springframework.batch.core.launch.JobLauncher; | |
| import org.springframework.batch.core.repository.JobRepository; |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <!-- Your stuff here... --> | |
| <build> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.apache.tomcat.maven</groupId> | |
| <artifactId>tomcat7-maven-plugin</artifactId> |
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.stereotype.Controller; | |
| import org.springframework.web.bind.annotation.RequestMapping; | |
| @Controller | |
| public class BadController extends BaseController{ | |
| @RequestMapping("/foobar") | |
| public void foobar() throws Exception{ | |
| throw new Exception("I meant to fail!"); | |
| } |
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.io.File; | |
| import java.io.FileNotFoundException; | |
| import java.util.List; | |
| import org.apache.commons.collections.CollectionUtils; | |
| import org.apache.commons.io.FileUtils; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.batch.core.StepContribution; | |
| import org.springframework.batch.core.scope.context.ChunkContext; |
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
| # Deploy to release | |
| mvn -DaltDeploymentRepository=snapshot-repo::default::file:/Users/$USER/dev/maven-repo/releases clean deploy | |
| # Deploy to snapshot | |
| mvn -DaltDeploymentRepository=snapshot-repo::default::file:/Users/$USER/dev/maven-repo/snapshots clean deploy | |
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
| var throttle = function (func, wait) { | |
| var context, args, timeout, result; | |
| var previous = 0; | |
| var later = function() { | |
| previous = new Date(); | |
| timeout = null; | |
| result = func.apply(context, args); | |
| }; | |
| return function() { | |
| var now = new Date(); |
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
| curl -s https://getcomposer.org/installer | php -d detect_unicode=Off |
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 enum ActionAuditType { | |
| USER_LOGGED_IN("User Logged In"), | |
| USER_LOGGED_OUT("User Logged Out"); | |
| private String mDescription; | |
| private ActionAuditType(String aDescription) { | |
| mDescription = aDescription; | |
| } | |
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
| tell application "System Preferences" | |
| quit | |
| delay 1 | |
| launch | |
| activate | |
| tell application "System Events" | |
| key down {option, command} | |
| end tell | |
| reveal pane id "com.apple.preference.displays" |