Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Jonas Rosado jonaswebdev

🏠
Working from home
View GitHub Profile
View fix-wordpress-permissions.sh
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
View docker-php-ext-install.md
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ 
@jonaswebdev
jonaswebdev / convert-encoding-to-utf8.sh
Created May 31, 2018
Script Convert/Update File encoding to UTF-8 in mass/batch (Eg: WINDOWS-1252 to UTF-8)
View convert-encoding-to-utf8.sh
#!/bin/sh
for file in $(find . -name "*.php" -type f)
do
iconv -f WINDOWS-1252 -t UTF-8 "$file" > "$file".utf8 && mv "$file".utf8 "$file" && echo "Success: $file"
done