sudo su
yum update -y
yun install nano
hostnamectl set-hostname xyz.com
echo 127.0.0.1 xyz.com >> /etc/hosts
swapon -s
dd if=/dev/zero of=/swapfile count=2048 bs=1MiB
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
#EXTM3U | |
#EXTINF:1,Blues | |
http://streaming.exclusive.radio/er/blues/icecast.audio | |
#EXTINF:2,Calm | |
http://streaming.exclusive.radio/er/calm/icecast.audio | |
#EXTINF:3,Chart | |
http://streaming.exclusive.radio/er/chart/icecast.audio | |
#EXTINF:4,Classical | |
http://streaming.exclusive.radio/er/classical/icecast.audio | |
#EXTINF:5,Country |
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
//not sure what to do with this code snippet? See https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/ | |
//BTC Donations to: bc1qc2s60yct2aqza4r7ryweheepd8xa8wqpfgdhg3 | |
add_filter( 'woocommerce_get_availability_text', 'handsome_bearded_guy_availability_text', 10, 2 ); | |
function handsome_bearded_guy_availability_text( $availability, $product ) { | |
$oos_replacement_messages = array(//the product id is the array key and the value is the replacement message | |
3871 => 'Here on Thursday', | |
3870 => 'on back order', | |
); |
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
//not sure what to do with this code snippet? See https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/ | |
add_filter( 'woocommerce_loop_add_to_cart_link', 'handsome_bearded_guy_maybe_remove_add_to_cart_button' ); | |
function handsome_bearded_guy_maybe_remove_add_to_cart_button( $html ) { | |
global $product; | |
if ( 'simple' === $product->get_type() && ! $product->get_stock_quantity() ) { | |
return null; | |
} | |
return $html; | |
} |
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
//not sure what to do with this code snippet? See https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/ | |
add_filter( 'woocommerce_states', 'add_uae_emirates' ); | |
function add_uae_emirates( $states ) { | |
$states['AE'] = array( | |
'AZ' => __( 'Abu Dhabi', 'woocommerce' ), | |
'AJ' => __( 'Ajman', 'woocommerce' ), | |
'FU' => __( 'Fujairah', 'woocommerce' ), | |
'SH' => __( 'Sharjah', 'woocommerce' ), | |
'DU' => __( 'Dubai', 'woocommerce' ), |
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
<?php // Don't use this line. | |
/* | |
* Add the script below to wherever you store custom code snippets | |
* in your site, whether that's your child theme's functions.php, | |
* a custom plugin file, or through a code snippet plugin. | |
*/ | |
/** | |
* This function will connect wp_mail to your authenticated |
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 | |
a | |
aa | |
aaa | |
aac | |
aaliyah | |
aaron | |
ab | |
aba | |
abandon |
IMPORTANT: Read this before implementing one of the configuration files below (for either Varnish 3.x or 4.x+).
USE: Replace the contents of the main Varnish configuration file located in /etc/varnish/default.vcl (root server access required - obviously) with the contents of the configuration you'll use (depending on your Varnish version) from the 2 examples provided below.
IMPORTANT: The following setup assumes a 180 sec (3 minute) cache time for cacheable content that does not have the correct cache-control HTTP headers. You can safely increase this to 300 sec (or more) for less busier sites or drop it to 60 sec or even 30 sec for high traffic sites. It obviously depends on your use case.
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
function getURLParameter(name) { | |
return decodeURI((RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]); | |
} | |
function hideURLParams() { | |
//Parameters to hide (ie ?success=value, ?error=value, etc) | |
var hide = ['success','error']; | |
for(var h in hide) { | |
if(getURLParameter(h)) { | |
history.replaceState(null, document.getElementsByTagName("title")[0].innerHTML, window.location.pathname); | |
} |
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
#!/bin/bash | |
whoisfile="/tmp/namecheck.whois.$$.txt" | |
listfile="/tmp/namecheck.list.$$.txt" | |
trap "cleanup; exit 1" SIGINT SIGTERM | |
# Clean up temporary files. | |
function cleanup { | |
rm -f $whoisfile $listfile |
NewerOlder