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 wordpress:5-apache | |
VOLUME ["/var/www/html/wp-content"] | |
# PERMISSION: Give permission to read/write in wp-content | |
RUN chown -R www-data.www-data /var/www/html/wp-content | |
# In case filesize is not modified, you have to enter to the instance and run the next command manually | |
RUN echo "php_value upload_max_filesize 700M" >> /var/www/html/.htaccess && echo "php_value post_max_size 702M" >> /var/www/html/.htaccess |
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 is a short collection of tools that are useful for managing your | |
# known_hosts file. In this case, I'm using the '-f' flag to specify the | |
# global known_hosts file because I'll be adding many deploy users on this | |
# system. Simply omit the -f flag to operate on ~/.ssh/known_hosts | |
# Add entry for host | |
ssh-keyscan -H github.com > /etc/ssh/ssh_known_hosts | |
# Scan known hosts | |
ssh-keygen -f /etc/ssh/ssh_known_hosts -H -F github.com |
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
# Make sure you grab the latest version | |
curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip | |
# Unzip | |
unzip protoc-3.2.0-linux-x86_64.zip -d protoc3 | |
# Move protoc to /usr/local/bin/ | |
sudo mv protoc3/bin/* /usr/local/bin/ | |
# Move protoc3/include to /usr/local/include/ |
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 wordpress:5-apache | |
VOLUME ["/var/www/html/wp-content"] | |
# PERMISSION: Give permission to read/write in wp-content | |
RUN chown -R www-data.www-data /var/www/html/wp-content | |
# CERTS: If you are using certs | |
## COPY ./your-folder/mycert.crt /etc/apache2/ssl/mycert.crt # Uncomment if you are using SSL certs | |
## COPY ./your-folder/mycert.key /etc/apache2/ssl/mycert.key # Uncomment if you are using SSL certs |
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
import ( | |
"archive/zip" | |
"io" | |
"os" | |
"path/filepath" | |
"strings" | |
) | |
func zipit(source, target string) error { | |
zipfile, err := os.Create(target) |
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 bash | |
func_check_for_root() { | |
if [ ! $( id -u ) -eq 0 ]; then | |
echo "ERROR: $0 Must be run as root, Script terminating" ;exit 7 | |
fi | |
} | |
func_check_for_root | |
#SETUP PARAMS |