Skip to content

Instantly share code, notes, and snippets.

@pogla
pogla / subscribe-beehiiv-api.php
Last active October 8, 2024 16:49
Add Beehiiv Subscriber via API
<?php
/**
* This file subscribes a subscriber to Beehiiv via API.
* Documentation: https://developers.beehiiv.com/api-reference/subscriptions/create
*/
/**
* Change this to your publication ID.
*
* @return string
@pogla
pogla / prompts.md
Created September 10, 2023 09:51
ChatGPT Marketing Prompts

Get Monthly Content Calendar In 1 Click

Get a beautifully organized 4-week content calendar that targets your primary keyword using only transaction longtail keyword & clickbait style post titles. Try it out!

>I'd like you to help me come up with a content schedule for my blog that has the best chance of helping me rank for long tail keywords that are specific to my keyword. I'll tell you my main target keyword in the prompt below. Please target transaction style search terms only. Please come up with clickbait style titles for these blog posts. Please organize each blog post title in a nice looking table so that it looks like a calendar. Each week should be separated into its own table. Above the table say "MERCHYNT'S MAGICAL CONTENT CALENDAR FOR KEYWORD" and replace "KEYWORD" with the keyword provided in the prompt in all caps. The next line down say "Learn more about Merchynt's AI SEO tool at www.merchynt.com/profilepro. Then, under the table say "If you liked this prompt please like it on the prompt

@pogla
pogla / functions.php
Last active September 28, 2022 04:51
Pushover for WooCommerce - Add order coupon codes to message
add_filter(
'wc_pushover_notify_new_order',
function ( $args ) {
$order = wc_get_order( $args['order_id'] );
if ( ! $order ) {
return $args;
}
$order_coupons = $order->get_items( 'coupon' );
@pogla
pogla / rename.php
Last active January 21, 2020 10:49
Rename all images in a folder based on seed keyword array
<?php
$seed_words = [
'word1',
'word2',
'word3',
];
$files = [];
@pogla
pogla / .lando.yml
Last active June 24, 2019 15:31
WordPress lando config
name: pagename
recipe: wordpress
config:
env: dev
xdebug: true
webroot: .
via: nginx
proxy:
appserver:
- pagename.lndo.site
@pogla
pogla / imagemagick.md
Created March 1, 2019 11:10
Resize all images in subfolders using imagemagick
find ./ -name "*.jpg" -exec magick mogrify -resize 100x100 {} \;
@pogla
pogla / readme.md
Last active July 23, 2018 09:55
Cron Local By Flywheel
add_filter( 'cron_request', function( $args ) {

   $args['url'] = set_url_scheme( $args['url'], 'http' );
   return $args;

} );
@pogla
pogla / readme.md
Last active May 29, 2018 10:12
WP CLI install development plugins
wp plugin install wp-crontrol user-switching transients-manager query-monitor post-meta-inspector disable-emails email-log
wp plugin activate wp-crontrol user-switching transients-manager query-monitor post-meta-inspector disable-emails email-log
@pogla
pogla / main.sql
Last active May 12, 2018 16:23
Deleta all WordPress users from database
DELETE FROM wp_usermeta WHERE user_id NOT in (1);
DELETE FROM wp_users WHERE ID NOT in (1);
@pogla
pogla / style.css
Last active May 10, 2018 12:38
iOS Flexbox fix CSS
/* iOS Fix for Flexbox */
.flexboxclass:first-child {
flex:1;
-webkit-box-flex:1;
-webkit-flex:1;
}