This file contains 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
This happen because selinux avoid db connections from the httpd server to the remote db server. To solve it you need to access your server trough ssh or just open a console if you have pretencial acces and do the follow: | |
You must check in the SELinux if the port 80 is managed in. You can check it typing # semanage port -l | grep http_port_t for list and check: | |
http_port_t tcp 443, 488, 8008, 8009, 8443, 9000 | |
If you need to add the required port, just type: | |
# semanage port -a -t http_port_t -p tcp 80 |
This file contains 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
echo "Hello Graylog, let's be friends." | nc -w 1 -u 127.0.0.1 9000 | |
echo '{"version": "1.1","host":"example.org","short_message":"A short message that helps you identify what is going on","full_message":"Backtrace here\n\nmore stuff","level":1,"_user_id":9001,"_some_info":"foo","_some_env_var":"bar"}' | gzip | nc -u -w 1 commons-graylog001.azure.zup.com.br 12379 |
This file contains 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
When getting the error about libnsl.so.1 | |
ln -s /usr/lib64/libnsl.so.2.0.0 /usr/lib64/libnsl.so.1 | |
ln -s /usr/lib/libnsl.so.2.0.0 /usr/lib/libnsl.so.1 |
This file contains 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
#!/usr/bin/env python | |
import subprocess | |
import os | |
ALL_JDK_FOLDERS = ['jdk1.8.0_181', 'graalvm-ee-1.0.0-rc4', 'jdk-10.0.1', 'jdk-9.0.4', 'jdk1.7.0_80', 'jdk1.6.0_45'] | |
BASE_FOLDER = '/opt/jdks' | |
DEFAULT_JDK_FOLDER = 'jdk1.8.0_181' |
This file contains 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 | |
alternatives --config java | |
alternatives --config javac | |
alternatives --config javaws | |
alternatives --config jconsole | |
alternatives --config keytool | |
alternatives --config java_home |
This file contains 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
1. On pom.xml | |
<dependency> | |
<groupId>com.fasterxml.jackson.datatype</groupId> | |
<artifactId>jackson-datatype-jsr310</artifactId> | |
<version>2.9.8</version> | |
</dependency> | |
2. On application.properties |
This file contains 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
1. Viewing branches diff with meld: | |
https://stackoverflow.com/questions/2006032/view-differences-of-branches-with-meld | |
git config --global diff.tool meld | |
File by File: | |
git difftool master..devel | |
Directory view: | |
git difftool -d master..devel |
This file contains 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 { | |
log_format bodylog '$remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent" $request_time ' | |
'<"$request_body" >"$resp_body"'; | |
lua_need_request_body on; | |
set $resp_body ""; | |
body_filter_by_lua ' |
This file contains 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
FROM openshift/jenkins-slave-base-centos7 | |
USER root | |
RUN curl -skL -o nodejs-bin.tar.xz https://nodejs.org/dist/v10.16.0/node-v10.16.0-linux-x64.tar.xz && \ | |
tar -xf nodejs-bin.tar.xz && \ | |
mv node-v10.16.0-linux-x64 /opt/nodejs | |
RUN ln -sf /opt/nodejs/bin/node /usr/local/bin/node && \ | |
ln -sf /opt/nodejs/bin/npm /usr/local/bin/npm && \ |
This file contains 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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |