Skip to content

Instantly share code, notes, and snippets.

View lukecav's full-sized avatar
🙏
If we're kind and polite, the world will be right.

Luke Cavanagh lukecav

🙏
If we're kind and polite, the world will be right.
View GitHub Profile
@lukecav
lukecav / Prompt examples
Last active December 4, 2024 20:36
Stable Diffusion XL Prompt examples
Cinematic images
detailed textures, sharp focus, ultra-high pixel detail, intricate, realistic, movie scene, cinematic, high-quality, full colors, incredibly detailed, 4k, 8k, 16k, hyper-realistic, RAW photo, masterpiece, ultra-detailed, professionally color graded, professional photography
cinematic, cinematic lighting, 8K raw photo, best quality, masterpiece, ultra high res, realistic, photography, digital painting, vibrant, intricate details, high-definition, detailed, sharp focus, 8k uhd
Lens Types
Wide-angle lens
Telephoto lens
@lukecav
lukecav / robots.txt
Created August 7, 2023 20:15
Disallowing GPTBot from OpenAI on your site
User-agent: GPTBot
Disallow: /
@lukecav
lukecav / wc_auto_complete_virtual.php
Created August 4, 2023 13:51 — forked from jessepearson/wc_auto_complete_virtual.php
Auto Complete all WooCommerce virtual orders
<?php // only copy this line if needed
/**
* Auto Complete all WooCommerce virtual orders.
*
* @param int $order_id The order ID to check
* @return void
*/
function custom_woocommerce_auto_complete_virtual_orders( $order_id ) {
@lukecav
lukecav / Command
Created July 27, 2023 18:50
Dismiss all notices in the Really Simple SSL plugin from WP-CLI command
wp rsssl update_option --dismiss_all_notices=true
@lukecav
lukecav / Commands
Created July 17, 2023 16:42
Stop all on-demand scanning tasks in Immunify360
imunify360-agent malware on-demand stop --all
imunify360-agent malware on-demand list
@lukecav
lukecav / Queries
Created July 5, 2023 17:43
Set all product inventory stock to zero in WooCommerce
UPDATE wp_postmeta pm
INNER JOIN wp_wc_product_meta_lookup pml
ON pm.post_id = pml.product_id
SET pm.meta_value = '0', pml.stock_quantity = '0'
WHERE pm.meta_key = '_stock';
UPDATE wp_postmeta pm
INNER JOIN wp_wc_product_meta_lookup pml
ON pm.post_id = pml.product_id
SET pm.meta_value = 'outofstock', pml.stock_status = 'outofstock'
@lukecav
lukecav / Queries
Created June 30, 2023 20:52
Delete Action Scheduler actions with a status of failed and canceled and truncate the Action Scheduler logs database table
DELETE FROMwp_actionscheduler_actions WHERE status IN ('failed','canceled')
TRUNCATE wp_actionscheduler_logs
@lukecav
lukecav / style.css
Created June 30, 2023 14:15
Hide the site title on mobile on the homepage in the Astra theme
@media (max-width: 768px) {
.site-branding .site-title {
display: none;
}
}
@lukecav
lukecav / Query
Created June 29, 2023 19:28
Delete disabled webhook data from WooCommerce
DELETE FROM wp_wc_webhooks WHERE status = 'disabled';
@lukecav
lukecav / wp-config.php
Created June 28, 2023 20:21
Enable lazy loading asynchronously in the Smush plugin
define( 'WP_SMUSH_ASYNC_LAZY', true );