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/kafka-console-consumer.sh --zookeeper localhost:2181 --topic apache_log --from-beginning |
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
| http://stackoverflow.com/questions/23164157/getting-intellij-idea-13-to-recognize-gradle-module-interdependencies |
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
| set dm_t_branch="dir" | |
| set dm_ear=%dm_t_branch%\xxx.ear | |
| set dm_war=%dm_t_branch%\yyy.war | |
| jar -tf %dm_ear% | grep "lib/" | grep -v "^dm-"| sed -e "s:lib/::g" > gradle-ear-libs-jars.txt | |
| jar -tf %dm_war% | grep "WEB-INF/lib/" | sed -e "s:WEB-INF/lib/::g" > gradle-libs-jars.txt | |
| cat gradle-ear-libs-jars.txt > zjunk.txt | |
| cat gradle-libs-jars.txt >> zjunk.txt | |
| grep -v "^dm-" zjunk.txt | sort > 2-gradle-total-ear-war-jars.txt |
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
| // matcher | |
| def m = "foo-bar" =~ /(.+)(-)(.+)/ | |
| println m[0] | |
| println m[0][1] | |
| println m[0][2] | |
| println m[0][3] | |
| assert m[0] == ["foo-bar", "foo", "-", "bar"] |
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
| /** | |
| * http://stackoverflow.com/questions/17875576/gradle-projects-depending-on-artifacts-created-by-sibling-projects | |
| */ | |
| apply plugin: 'java' | |
| repositories { | |
| mavenCentral() | |
| } |
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 me; | |
| import java.util.Enumeration; | |
| import java.util.Properties; | |
| /** | |
| * Created with IntelliJ IDEA. | |
| * User: chris | |
| * Date: 7/4/14 | |
| * Time: 3:54 PM |
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
| task addToWar(type: Jar) { | |
| destinationDir = file('dist') | |
| archiveName = 'drools-guvnor.war' | |
| from zipTree('ss/drools-guvnor.war') | |
| from(file("ss/RRR.txt")) { | |
| into ('META-INF') | |
| } | |
| } |
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 t; | |
| import org.glassfish.jersey.server.ResourceConfig; | |
| import org.glassfish.jersey.server.spring.SpringLifecycleListener; | |
| import org.glassfish.jersey.server.spring.scope.RequestContextFilter; | |
| import org.glassfish.jersey.test.JerseyTest; | |
| import org.glassfish.jersey.test.inmemory.InMemoryTestContainerFactory; | |
| import org.junit.Test; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.context.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
| /** | |
| http://stackoverflow.com/questions/17370176/webapplicationinitializer-is-not-launched-on-jettyselenium | |
| */ | |
| public class WebappConfig implements WebApplicationInitializer { | |
| protected final Logger logger = LoggerFactory.getLogger(getClass()); | |
| @Override | |
| public void onStartup(final ServletContext servletContext) throws ServletException { |
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
| /** | |
| * in grails-app/resource/spring/resource.groovy | |
| * beans = { | |
| * hibernateProxyAdapterFactory(hbadapter.HibernateProxyAdapterFactory) | |
| * } | |
| * | |
| */ | |
| package hbadapter; | |
| import org.hibernate.proxy.HibernateProxy; |