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
<Loggers> | |
<logger name="org.springframework.boot.actuate.metrics.statsd.StatsdMetricWriter" additivity="false" level="error"> | |
<appender-ref ref="console_appender" /> | |
</logger> | |
<Root level="trace"> | |
<AppenderRef ref="console_appender" level="debug"/> | |
</Root> | |
</Loggers> |
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
Looks at the dependencies after final resolution and looks for mismatches in your dependencyManagement section: | |
> mvn dependency:analyze-dep-mgt | |
Resolving conflicts with dependency tree: | |
> mvn dependency:tree -Dverbose -Dincludes=commons-collections | |
More info: http://maven.apache.org/plugins/maven-dependency-plugin/examples/resolving-conflicts-using-the-dependency-tree.html |
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
Logstash config file for log4j2 pattern: | |
[%d{dd/MM/yyyy HH:mm:ss.SSS}][SERVICE_NAME][%-5level][%t]:[%X{correlation-id}][%c{1}.%M:%L] - %m%n | |
Run logstash: | |
> bin/logstash -f conf/logstash-syslog.conf --auto-reload | |
--- |
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 | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
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
Checkout pull request | |
git fetch origin pull/<pull request number>/head:<destination branch> | |
git checkout <destination branch> | |
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
Purge messages using the activemq-admin command line: | |
activemq-admin purge --jmxurl service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi --jmxuser camel --jmxpassword password purge com.test.queue.dlq | |
JMX needs to be enabled to purge messages, check ./conf/activemq.xml has the createConnector enabled: | |
<managementContext> | |
<managementContext createConnector="true"/> | |
</managementContext> |
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 com.agilogy.spray.cors | |
import spray.http.{HttpMethods, HttpMethod, HttpResponse, AllOrigins} | |
import spray.http.HttpHeaders._ | |
import spray.http.HttpMethods._ | |
import spray.routing._ | |
// see also https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS | |
trait CORSSupport { | |
this: HttpService => |
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 String getCarInsuranceName(Optional<Person> person) { | |
return person.flatMap(Person::getCar) | |
.flatMap(Car::getInsurance) | |
.map(Insurance::getName) | |
.orElse("Unknown"); | |
} |
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
Extract public key from pem private key | |
ssh-keygen -y -f KEYFILE.pem |
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
# define some variables | |
variable "aws_ubuntu_ami" { | |
default = "ami-972444ad" | |
} | |
variable "aws_keypair" { | |
default = "xxxx" | |
} | |
# AWS account details |