Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# command line arguments
for i in "$@"
do
# echo $i
case $i in
-l=*|--wp_locale=*)
WP_LOCALE="${i#*=}"
;;
@dbrosy
dbrosy / uploads.ini
Last active November 17, 2017 12:48
file_uploads = On
memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 1800
# Go to the folder
cd /usr/local/etc/php/conf.d
defaults
log 127.0.0.1:8514 local0 debug
frontend 80
acl lepath path_beg -i /.well-known/acme-challenge
redirect scheme https code 301 if !lepath !{ ssl_fc }
/**
*
* Debugging
*
*/
define( 'WP_DEBUG', true ); /** Enable Debuging **/
define( 'WP_DEBUG_LOG', true ); /** Enable saving to log file in wp-content **/
define( 'WP_DEBUG_DISPLAY', false ); /** Enable showing errors on pages **/
define( 'SCRIPT_DEBUG', false ); /** Force loading of full scrips and stylesheets instead of minified versions **/
define( 'SAVEQUERIES', false ); /** For profiling and tuning performance
'No direct script access allowed' --> check wp-config.php has: define('WPLANG', '');
sudo nano /lib/systemd/system/docker.service
// modify line from
ExecStart=/usr/bin/docker daemon -H fd://
to
ExecStart=/usr/bin/docker daemon -H fd:// -H tcp://0.0.0.0:
then
sudo systemctl daemon-reload
sudo systemctl restart docker.service

Installing RancherOS on VMware Workstation

Requirements

Component Setting
Guest OS Other 4.x kernal 64-bit
Storage 20GB
CPU 2
Memory 2GB
@dbrosy
dbrosy / functions.php
Created February 12, 2018 11:31
Remove Query Strings
function _remove_script_version( $src ) {
$parts = explode( '?ver', $src );
return $parts[0];
}
add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );
# PPTP
configure
# -------------------------------------
# Routing Tables - Static Routes
# -------------------------------------
# pppoe0
set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface pppoe0
# pptpc0
set protocols static table 2 interface-route 0.0.0.0/0 next-hop-interface pptpc0

Run as root

sudo -i

Create openvpn directory and set permissions

cd /config
mkdir openvpn
chmod 777 openvpn