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
add_filter( 'woocommerce_billing_fields', 'custom_woocommerce_billing_fields' ); | |
function custom_woocommerce_billing_fields( $fields ) { | |
// Over-ride a single label | |
$fields['billing_first_name']['label'] = 'Your label'; | |
// Over-ride a single required value | |
$fields['billing_first_name']['required'] = false; |
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
/** | |
* Add the field to the checkout | |
**/ | |
add_action('woocommerce_after_order_notes', 'my_custom_checkout_field'); | |
function my_custom_checkout_field( $checkout ) { | |
echo '<div id="my_custom_checkout_field"><h3>'.__('My Field').'</h3>'; | |
/** |
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
# I ( Michael ) needed a basic mail transfer to perform basic server mail functions ::: After searching it seems using sSMTP is the best bet ::: sSMTP a simple alternative to Sendmail ::: | |
# What is sSMTP ? | |
# It's an extremely simple MTA ( mail Transfer Application ), effective and simple way of getting mail off a system to your mail hub. | |
# NOTE ! it is all it does it does not receive mail, expand aliases or manage a queue. | |
# IMPORTANT : add your own data or parameters, I make use of double segments [[ your variable ]]. eg. ssh root@[[ 96.172.44.11 ]] should be replaced with ssh root@888.88.88.88 where "888.88.88.88" is your value, variable etc. I have a habit of using ":::" to indicate line ending and end of paragraph, crazy I know but be warned its just how I write ::: All notes are for my own use & should you use any it's at your own risk, it's NOT a Tutorial ::: | |
# I'm new to server side setup so if I've erred or you know of a better way PLS. contribute ::: |
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
# Fail2ban is an intrusion prevention framework written in the Python programming language. I've added additional security for unauthorised WP login attempts and SSH security to non default port | |
# IMPORTANT : add your own data or parameters, I make use of double segments [[ your variable ]]. eg. ssh root@[[ 96.172.44.11 ]] should be replaced with ssh root@888.88.88.88 where "888.88.88.88" is your value, variable etc. I have a habit of using ":::" to indicate line ending and end of paragraph, crazy I know but be warned its just how I write ::: All notes are for my own use & should you use any it's at your own risk, it's NOT a Tutorial ::: | |
# References | |
# http://www.fail2ban.org/wiki/index.php/MANUAL_0_8 | |
# https://www.digitalocean.com/community/articles/how-to-protect-ssh-with-fail2ban-on-ubuntu-12-04 | |
# http://www.dp.cx/blog/postfix---fail2ban---win.html | |
# http://en.wikipedia.org/wiki/Fail2ban | |
# http://www.imrazor.de/wordpress/?p=875 |
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 server more secure by changing default ssh port | |
# No matter what you do keep your port number safe ... else ... | |
# IMPORTANT : add your own data or parameters, I make use of double segments [[ your variable ]]. eg. ssh root@[[ 96.172.44.11 ]] should be replaced with ssh root@888.88.88.88 where "888.88.88.88" is your value, variable etc. I have a habit of using ":::" to indicate line ending and end of paragraph, crazy I know but be warned its just how I write ::: All notes are for my own use & should you use any it's at your own risk, it's NOT a Tutorial ::: | |
# Open the configuration file | |
nano /etc/ssh/sshd_config | |
# Find the following sections and change the information where applicable: | |
Port [[ 1234 ]] |
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
# vsftpd - Very Secure Deamon | |
# IMPORTANT : add your own data or parameters, I make use of double segments [[ your variable ]]. eg. ssh root@[[ 96.172.44.11 ]] should be replaced with ssh root@888.88.88.88 where "888.88.88.88" is your value, variable etc. I have a habit of using ":::" to indicate line ending and end of paragraph, crazy I know but be warned its just how I write ::: All notes are for my own use & should you use any it's at your own risk, it's NOT a Tutorial ::: | |
# Resource | |
# https://help.ubuntu.com/12.04/serverguide/ftp-server.html | |
# https://help.ubuntu.com/community/vsftpd | |
# http://www.noob2geek.com/linux/setup-vsftpd-debian-ubuntu/ | |
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
# Basic Terminal Commands mySQL | |
# IMPORTANT : add your own data or parameters, I make use of double segments [[ your variable ]]. eg. ssh root@[[ 96.172.44.11 ]] should be replaced with ssh root@888.88.88.88 where "888.88.88.88" is your value, variable etc. I have a habit of using ":::" to indicate line ending and end of paragraph, crazy I know but be warned its just how I write ::: All notes are for my own use & should you use any it's at your own risk, it's NOT a Tutorial ::: | |
# Resources | |
# http://www.pantz.org/software/mysql/mysqlcommands.html | |
# Login to your terminal | |
# Show all DB's |
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
# A fully qualified domain name (FQDN), sometimes also referred as an absolute domain name | |
# IMPORTANT : add your own data or parameters, I make use of double segments [[ your variable ]]. eg. ssh root@[[ 96.172.44.11 ]] should be replaced with ssh root@888.88.88.88 where "888.88.88.88" is your value, variable etc. I have a habit of using ":::" to indicate line ending and end of paragraph, crazy I know but be warned its just how I write ::: All notes are for my own use & should you use any it's at your own risk, it's NOT a Tutorial ::: | |
# resources : | |
# http://serverfault.com/questions/367492/how-is-the-fqdn-determined | |
# http://ubuntuforums.org/showthread.php?t=1189965 | |
# Edit The Hosts file | |
sudo nano /etc/hosts |
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
# RSYNC is a software application for Unix systems which synchronizes files and directories from one location to another ::: | |
# IMPORTANT : add your own data or parameters, I make use of double segments [[ your variable ]]. eg. ssh root@[[ 96.172.44.11 ]] should be replaced with ssh root@888.88.88.88 where "888.88.88.88" is your value, variable etc. I have a habit of using ":::" to indicate line ending and end of paragraph, crazy I know but be warned its just how I write ::: All notes are for my own use & should you use any it's at your own risk, it's NOT a Tutorial ::: | |
# Backing up files can be simple like my example below, or a bit more complicated backing up with RSYNC to another server etc. I did not need anything "complicated" but if you require exteral sync, below are several links to get you going ::: | |
# resources | |
# https://help.ubuntu.com/community/CronHowto | |
# https://help.ubuntu.com/community/rsync |
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
# It's essential to periodically BU your DB, having this done while your sitting at the beach is a bonus, fortunately it's relatively simple even for server newbie like myself | |
# I also wanted to keep a BU for at least 6 days, so I went about setting up a cron to BU my "Time Stamped" DB, on the eight day I start removing date -7 day's , leaving me with a couple of days DB stock ::: | |
# IMPORTANT : add your own data or parameters, I make use of double segments [[ your variable ]]. eg. ssh root@[[ 96.172.44.11 ]] should be replaced with ssh root@888.88.88.88 where "888.88.88.88" is your value, variable etc. I have a habit of using ":::" to indicate line ending and end of paragraph, crazy I know but be warned its just how I write ::: All notes are for my own use & should you use any it's at your own risk, it's NOT a Tutorial ::: | |
# Resources | |
# BIG THANKS TO @chrishough >> http://noconformity.com/blog/2013/04/15/linux-server-automation-scripts/ | |
# https://help.ubuntu.com/12.04/serverguide/backup-shellscripts.html |
OlderNewer