INSERT GRAPHIC HERE (include hyperlink in image)
Subtitle or Short Description Goes Here
############################################################## | |
# | |
# install-lamp.sh (Server) | |
# | |
# Installs LAMP (PHP Version 5.6) Stack and other dev tools on ubuntu 14.04 Server | |
# | |
# Author: Napoleon Arouldas S. | |
# | |
# Lead Developer of http://grandappstudio.com/roll-out/ | |
# |
/* | |
Slugifies the text in pure javascript | |
Converts | |
What's the best way to learn PHP ? => whats-the-best-way-to-learn-php | |
*/ | |
function slugify(text) | |
{ | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - |
aws s3api list-objects --bucket <bucket-name> --output json --query "[sum(Contents[].Size), length(Contents[])]" |
<?php | |
require dirname(__FILE__).'/wp-blog-header.php'; | |
$wpdb->query("DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%')"); | |
$wpdb->query("DELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%'"); | |
$wpdb->query("DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy)"); | |
$wpdb->query("DELETE FROM wp_term_relationships WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))"); | |
$wpdb->query("DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))"); | |
$wpdb->query("DELETE FROM wp_posts WHERE post_type IN ('product','product_variation')"); |
/** | |
* @snippet Add privacy policy tick box at checkout | |
* @how-to Watch tutorial @ https://businessbloomer.com/?p=19055 | |
* @author Rodolfo Melogli | |
* @compatible WooCommerce 3.6.3 | |
* @donate $9 https://businessbloomer.com/bloomer-armada/ | |
*/ | |
// Add this code where ? | |
// You can place PHP snippets at the bottom of your child theme functions.php file (before "?> |
// This snippet will get the width, height of the viewport everytime you resize the browser window. | |
// The weight, height will be displayed on console window. | |
$(document).ready(function(){ | |
var viewportWidth = $(window).width(); | |
var viewportHeight = $(window).height(); | |
console.info('Viewport W = ' + viewportWidth); | |
console.info('Viewport H = ' + viewportHeight); |
/* Courtesy : https://dev.to/gajus/my-favorite-css-hack-32g3 */ | |
* { background-color: rgba(255,0,0,.2); } | |
* * { background-color: rgba(0,255,0,.2); } | |
* * * { background-color: rgba(0,0,255,.2); } | |
* * * * { background-color: rgba(255,0,255,.2); } | |
* * * * * { background-color: rgba(0,255,255,.2); } | |
* * * * * * { background-color: rgba(255,255,0,.2); } |
-- Mysql commandline option to change the baseurl or siteur or home url of a wordpress website | |
-- This option will be handy, when you are not able to loging to admin panel of wordpress website. | |
update wp_options set option_value='http://newwebsite.com' where option_name = 'siteurl'; | |
update wp_options set option_value='http://newwebsite.com' where option_name = 'home'; |
<?php | |
//Even words can be use as delimiters in php explode function. | |
$s = 'Napoleon and Arouldas'; | |
$s_pieces = explode('and', $s); | |
$rating = $s_pieces[0]; | |
$review_count = $s_pieces[1]; |