Skip to content

Instantly share code, notes, and snippets.

View neps-in's full-sized avatar

Napoleon Arouldas neps-in

View GitHub Profile
@neps-in
neps-in / sampleREADME.md
Created June 21, 2019 17:49 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here

@neps-in
neps-in / delete-all-woocommerce-products.php
Created May 29, 2019 11:16 — forked from mikaelz/delete-all-woocommerce-products.php
Remove all WooCommerce products from database via SQL
<?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')");
@neps-in
neps-in / s3-bucket-stats.sh
Created March 16, 2019 16:17 — forked from cupracer/s3-bucket-stats.sh
Amazon S3 CLI: get bucket stats
aws s3api list-objects --bucket <bucket-name> --output json --query "[sum(Contents[].Size), length(Contents[])]"