Skip to content

Instantly share code, notes, and snippets.

View albertoaflores's full-sized avatar
💭
Hacking some Open Source

Alberto Flores albertoaflores

💭
Hacking some Open Source
View GitHub Profile
@albertoaflores
albertoaflores / .mavenrc
Created July 3, 2012 12:27
Sample .mavenrc file for SSL connections
MAVEN_OPTS="-Djavax.net.ssl.keyStore=<YOU KEYSTORE FILE> \
-Djavax.net.ssl.keyStorePassword=<YOUR KEYSTORE PASSWORD> \
-Djavax.net.ssl.keyStoreType=JKS \
-Djavax.net.ssl.trustStore=<YOUR TRUSTSTORE FILE> \
-Djavax.net.ssl.trustStorePassword=<YOUR TRUSTSTORE PASSWORD> \
-Djavax.net.ssl.trustStoreType=JKS"
@albertoaflores
albertoaflores / activemq.xml
Created December 3, 2019 23:48
Custom ActiveMQ configuration
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@albertoaflores
albertoaflores / PayloadGeneratorConfiguration.java
Created November 30, 2019 12:37
Generates a TaskExecutor to control the threads used in a given @async
@Bean(name = "myThreadPoolTaskExecutor")
public TaskExecutor threadPoolTaskExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(4);
executor.setMaxPoolSize(4);
executor.setThreadNamePrefix("executor");
executor.initialize();
return executor;
}
@albertoaflores
albertoaflores / PayloadGenerator.java
Created November 30, 2019 12:30
Using Async to force multiple threads to create payloads.
@Async("myThreadPoolTaskExecutor")
public Object createPayload() {
// return payload pojo
}
@albertoaflores
albertoaflores / .bash_profile
Created February 17, 2019 02:37
Sample PS1 Configuration
function get_emoji() {
if [ $? -eq 0 ]; then
echo '👍🏻'
else
echo '👎🏻'
fi
}
# get current branch in git repo
function parse_git_branch() {
@albertoaflores
albertoaflores / sample-surefire-pom.xml
Created July 3, 2012 12:42
Sample pom.xml showing configuration of the surefire maven plugin using SSL (and debug flags)
...
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertiesVariables>
<property>
<name>ssl.debug</name>
<value>true</value>
</property>
<property>
@albertoaflores
albertoaflores / 0006-add-mailchimp-as-default-contact-me-page-provider.md
Last active April 28, 2017 10:22
Sample page that supercedes another ADR
@albertoaflores
albertoaflores / bootstrap.yml
Last active April 22, 2017 15:05
Sample bootstrap.yml file for Spring Boot application that decrypts properties in the client side.
spring:
application:
name: survey-service
cloud:
config:
uri: http://localhost:8888
label: 1.0.0
encrypt:
keyStore:
@albertoaflores
albertoaflores / config-server-application.yml
Created April 21, 2017 20:50
Sample Config Server (boot) configuration in YML format.
server:
port: 8888
spring:
cloud:
config:
server:
encrypt:
enabled: false
git:
uri: ${HOME}/workspace/configuration/sample-boot-demo-configuration