Skip to content

Instantly share code, notes, and snippets.

View yongkiagustinus's full-sized avatar
👨‍💻
Remote Working

Yongki Agustinus yongkiagustinus

👨‍💻
Remote Working
View GitHub Profile
@yongkiagustinus
yongkiagustinus / copy_parent_theme_mods.php
Created February 23, 2021 07:26
Use this script to copy customization from parent theme
<?php
/**
* This script just need to run once
* You can remove this script after the copy completed
*/
function copy_parent_mods(){
$parent_mods = get_option( 'theme_mods_' . get_template() );
foreach ( (array) $parent_mods as $parent_mod => $parent_mod_value ) {
set_theme_mod( $parent_mod, $parent_mod_value );
}
@yongkiagustinus
yongkiagustinus / whm-bulk-emails.sh
Created April 9, 2017 15:49
Bash script to setup email for all cPanel accounts in WHM
#! /bin/sh
# Get all domains as array
# You can change /etc/trueuserdomains to /etc/userdomains if you want to include the sub domain
domains=(`cat /etc/trueuserdomains | cut -d: -f1`)
echo "Found ${#domains[@]} domains"
echo -e "\n"