Skip to content

Instantly share code, notes, and snippets.

View humbertocastelo's full-sized avatar
🍓

Humberto Castelo Branco humbertocastelo

🍓
View GitHub Profile
@humbertocastelo
humbertocastelo / install.sh
Created January 25, 2018 22:55
Stamping text on all PDF pages
#!/bin/bash
sudo apt-get install -y xvfb
sudo apt-get install -y wkhtmltopdf
sudo apt-get install -y pdftk
@humbertocastelo
humbertocastelo / wp-add-concatenate-scripts.sh
Last active February 9, 2018 00:54
WP Add CONCATENATE_SCRIPTS
#!/bin/bash
files=()
for home in /home/*; do
if [[ -d "${home}/public_html" ]]; then
if [[ -f "${home}/public_html/wp-config.php" ]]; then
files+=("${home}/public_html/wp-config.php")
fi
for folder in ${home}/public_html/*; do
sudo chmod 0755 /var/www
sudo chmod 0755 /var/www/html
sudo chmod 0640 /var/www/html/wp-config.php
sudo chown -R www-data:www-data /var/www/html
sudo find /var/www/html -type d -exec chmod 0755 {} \;
sudo find /var/www/html -type f -exec chmod 0644 {} \;
sudo find /var/www/html/wp-content/plugins -type f -name "*" -not -name "*.o" -exec sh -c '
case "$(head -n 1 "$1")" in
?ELF*) exit 0;;
MZ*) exit 0;;