Skip to content

Instantly share code, notes, and snippets.

View obiPlabon's full-sized avatar
🎯
1 goal

Md Obidullah obiPlabon

🎯
1 goal
View GitHub Profile
@obiPlabon
obiPlabon / gp-populate-anything-merge-tag-context-modifier.php
Created April 2, 2023 07:40 — forked from spivurno/gp-populate-anything-merge-tag-context-modifier.php
Gravity Perks // Populate Anything // Replace Merge Tags in Specific Context
<?php
/**
* Gravity Perks // Populate Anything // Replace Merge Tags in Specific Context
* http://gravitywiz.com/documentation/gravity-forms-nested-forms/
*
* @video https://www.loom.com/share/d626a60769ee48579b6f426a677918a3
*
* This snippet allows you to replace a merge tag in the context of an entry selected in a GPPA-populated field. For
* example, if you populate a Drop Down field with entries and then have an HTML field which includes the {all_fields}
* merge tag, you could use the context modifier to specify that Drop Down field as the context like so:
@obiPlabon
obiPlabon / ffmpeg-watermark.md
Created December 25, 2022 16:00 — forked from bennylope/ffmpeg-watermark.md
FFmpeg add a watermark to video

How to Add a Watermark to Video

FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.

Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:

ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4

Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.

@obiPlabon
obiPlabon / gutenberg.txt
Created March 3, 2021 16:24 — forked from chrismccoy/gutenberg.txt
Gutenberg Resources
Getting Started with Block Themes: Patterns
https://themeshaper.com/2021/01/11/getting-started-with-block-themes-patterns/
WordPress Blocks Backwards Compatibility
https://webdevstudios.com/2020/12/29/wordpress-blocks-backwards-compatibility/
Stylin’ WordPress Gutenberg Columns Block
https://dbushell.com/2020/11/02/wordpress-gutenberg-columns-block-css-styles/
Gutenberg Components and Invalid Hook Call Error in React
@obiPlabon
obiPlabon / mepr-active-memberships.php
Created August 29, 2020 06:30 — forked from andrija-naglic/mepr-active-memberships.php
Get a list of the current user's active MemberPress Subscriptions
<?php
function memberpress__get_all_memberships( $user_id = false ){
if( class_exists('MeprUser') ){
if( ! $user_id ){
$user_id = get_current_user_id();
}
@obiPlabon
obiPlabon / mepr-active-memberships.php
Last active August 29, 2020 06:28 — forked from cartpauj/mepr-active-memberships.php
Get a list of the current user's active MemberPress Subscriptions
<?php
if(class_exists('MeprUtils')) {
$user = MeprUtils::get_currentuserinfo();
if($user !== false && isset($user->ID)) {
//Returns an array of Membership ID's that the current user is active on
//Can also use 'products' or 'transactions' as the argument type
$active_prodcuts = $user->active_product_subscriptions('ids');
if(!empty($active_prodcuts)) {
@obiPlabon
obiPlabon / extend-subscription-intervals.php
Created August 20, 2020 06:43 — forked from thenbrent/extend-subscription-intervals.php
Add a new billing interval to WooCommerce Subscriptions. Specifically a "every 10 weeks" billing interval to selling a subscription to something and be charged every 10 weeks.
<?php
/**
* Plugin Name: Extend WooCommerce Subscription Intervals
* Description: Add a "every 10 weeks" billing interval to WooCommerce Subscriptions
* Author: Brent Shepherd
* Author URI: http://brent.io
* Version: 1.0
* License: GPL v2
*/
#stop directory browsing
Options All -Indexes
# SSL Https active Force non-www
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
<?php
/**
* Plugin Name: EDD Heartbeat API test plugin
* Description: Demonstrates how to use the Heartbeat API to update the payments count on the dashboard
*/
// Load the heartbeat JS
function edd_heartbeat_enqueue( $hook_suffix ) {
// Make sure the JS part of the Heartbeat API is loaded.
wp_enqueue_script( 'heartbeat' );
@obiPlabon
obiPlabon / functions.php
Created February 6, 2017 15:20 — forked from EmranAhmed/functions.php
Hook Info. Get Action hook info. What functions are hooked to an action / filter in WordPress? How can I see all the actions attached to an "add_action" hook?
<?php
if ( ! function_exists( 'hippo_plugin_hook_info' ) ):
function hippo_plugin_hook_info( $hook_name ) {
global $wp_filter;
$docs = array();
$template = "\t - %s Priority - %s.\n\tin file %s #%s\n\n";
echo '<pre>';
/* global jQuery, wp */
jQuery( function( $ ) {
var initializeAllClocks, initializeClock;
/**
* Find clocks.
*
* @param [container] Scoping element for finding clock elements.
* @returns {void}