Update OpenSSL on Centos7
[gist]9b3ac2399dcdb0356223b1f34c56e54c[/gist]
[gist]9b3ac2399dcdb0356223b1f34c56e54c[/gist]
Just create a jboss-deployment-structure.xml inside your /META-INF/ context path folder with these contents, for example:
[gist https://gist.github.com/rafaelszp/099e90ff18aaee20f662cf21d749d66c/\]
In this example I'm excluding JPA and Hibernate subsystems.
First of all, list packages
adb shell pm list packages |grep appname
Then find out where it is placed the required apk
adb shell pm path the.package.name
Finally pull the desired apk
adb pull /data/app/path-to-apk/apk-name.apk ~/tmp/
Creating the registry
docker-machine create registry
docker-machine ssh registry
docker run -d -p 5000:5000 --restart=always --name registry registry:2
Enabling push to "insecure" docker registry
sudo vim /etc/docker/daemon.json
Restarting docker
sudo systemctl restart docker.service
Assuming you docker-machine IP is 192.168.99.100, insert this line:
{ "insecure-registries":["192.168.99.100:5000"] }
Building an image with tag
docker build --tag my-image -f src/main/docker/Dockerfile .
Tagging your custom image to point to your local registry:
docker tag my-image 192.168.99.100:5000/my-image
Pushing your custom image:
docker push 192.168.99.100:5000/my-image
Reference: Deploying a registry server
URL: http://{keycloak_url}/auth/realms/{realm}/protocol/openid-connect/token
Request Headers:
grant_type:password client_id:{client_id} response_type:token username:{username} password:{password} client_secret: {client_secret} -> Just needed when Access type = confidential
Just do a GET to the keycloak URL:
http://{SERVER_URL}/auth/realms/{realm}/protocol/openid-connect/userinfo
Dont forget to send this request with you authorization header. Ex:
Authorization: Bearer {token}
~~~
I got this example from DZone: Builder Design Pattern With Java 8
I just modified a little bit in order to be executable with:
javac FunctionalBuilderTest.java && java FunctionalBuilderTest
Code below: https://gist.github.com/rafaelszp/1cf6251da003cf64d83ca5a96c624ce8
Formula: 1.43x Maximum heap size used by your application. Example: If your application allocated 4000Mb(max) of heap. So
1.43 x 4000 = 5720
So your Xmx flag should be: -Xmx=5720
Formula: 0.40x Maximum head available(Xmx) Example: if your Xmx=5720,
0.40 x 5720 = 2288
So your Xms flag should be: -Xms=2288
Installing libs
yum install postfix mailx cyrus-sasl-plain
Writing smtp authentication config
echo "smtp_user@gmail.com smtp_user:smtp_passwd" > /etc/postfix/sasl_passwd
postmap hash:/etc/postfix/sasl_passwd
Edit mail.cnf file like following
#debug_peer_list=smtp.gmail.com
#debug_peer_level=3
compatibility_level = 2
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = hostname.example.com
mydomain = example.com
inet_interfaces = all
inet_protocols = ipv4
unknown_local_recipient_reject_code = 550
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
relayhost = smtp.gmail.com
smtp_sender_dependent_authentication = yes
sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost_map
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_use_tls = yes
smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt
mynetworks = 14.11.0.0/16
transport_maps = hash:/etc/postfix/transport
Edit /etc/postfix/relayhost_map file like following:
usu01@gmail.com usu01@gmail.com:senha
usu02@gmail.com usu02@gmail.com:senha
Type this command and hit enter
postmap /etc/postfix/relayhost_map
** Include theses lines in /etc/aliases file:**
usu01: usu01@gmail.com
usu02: usu02@gmail.com
Type this command and hit enter
postmap /etc/aliases
Edit /etc/postfix/transport file:
* smtp:smtp.gmail.com
Type these command and hit enter
postmap /etc/postfix/transport
service postfix restart