Nosso canal no telegram: Vagas Dev
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
import logging | |
import logging.config | |
logging.dictConfig({ | |
'version': 1, | |
'disable_existing_loggers': False, | |
"formatters": { | |
"standard": { | |
"format": '%(asctime)s %(name)s %(levelname)s %(message)s' | |
} |
############################################################################################################ ################## ############################# ################## #############################
This Gist collection contains all localstack related examples
################## ############################# ################## ############################# ############################################################################################################
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
# Export dump particular database. | |
$ kubectl exec {{podName}} -n {{namespace}} -- mysqldump -u {{dbUser}} -p{{password}} {{DatabaseName}} > <scriptName>.sql | |
# Export dump all databases. | |
$ kubectl exec {{podName}} -n {{namespace}} -- mysqldump -u {{dbUser}} -p{{password}} --all-databases > <scriptName>.sql | |
# Restore a database from a dump. | |
$ kubectl exec -it {{podName}} -n {{namespace}} -- mysql -u {{dbUser}} -p{{password}} {{DatabaseName}} < <scriptName>.sql |
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
#!/usr/bin/env bash | |
# https://gist.github.com/rverst/1f0b97da3cbeb7d93f4986df6e8e5695 | |
function chsv_check_version() { | |
if [[ $1 =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ ]]; then | |
echo "$1" | |
else | |
echo "" | |
fi | |
} |
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
############################################################### | |
Apache Installation | |
############################################################### | |
# Install required tools for compilation | |
sudo yum install autoconf expat-devel libtool libnghttp2-devel pcre-devel -y | |
# Download source code | |
cd #switch to home dir | |
curl -O -L https://github.com/apache/httpd/archive/2.4.37.tar.gz #latest stable release Apache |
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
<VirtualHost *:80> | |
ServerName jenkins.example.com | |
ServerAdmin [email protected] | |
RewriteEngine on | |
RewriteCond %{SERVER_PORT} !^443$ | |
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L] | |
</VirtualHost> | |
<IfModule mod_ssl.c> | |
<VirtualHost *:443> |
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
def getProjectName() { | |
return 'JenkinsPipeline' | |
} | |
def getJDKVersion() { | |
return 'jdk1.8.0_101' | |
} | |
def getMavenConfig() { | |
return 'maven-config' |
Example on how to run locally an AWS Lambda via API Gateway using localstack.
Based on...
NewerOlder