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 / fix-drestaurant-feature-list-field.php
Created December 25, 2023 06:41
Fix dRestaurant feature list field sanitization issue
<?php
function drestaurant_sanitize_listing_form_meta_fields( $meta_data, $posted_data ) {
$feature_list = directorist_get_listing_form_field( $posted_data['directory_id'], 'drestaurant_feature_list' );
if ( empty( $feature_list ) ) {
return $meta_data;
}
if ( ! isset( $feature_list['field_key'] ) || ! isset( $posted_data[ $feature_list['field_key'] ] ) ) {
# See branchs with author name
git branch --list --format="%(committerdate:short) %(authorname) %(refname:short)" --sort=committerdate | grep obiPlabon
@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 / assets-directory-structure.md
Created January 24, 2022 15:41
Assets directory structure proposal for Directorist
  • assets
    • images
    • fonts
    • extra {for additional non categoried items}
    • src
      • frontend/public
        • scss
        • js
      • backend/admin
  • scss
@obiPlabon
obiPlabon / directorist-rank-math-rating-support.php
Last active August 18, 2021 13:18
Add RankMath ratingValue schema support to Directorist
<?php
add_filter( 'rank_math/json_ld', function( $schemas, $jsonld ) {
if ( ! ( defined( 'ATBDP_POST_TYPE' ) && is_singular( ATBDP_POST_TYPE ) ) ) {
return $schemas;
}
foreach ( $schemas as $key => &$schema ) {
if ( is_array( $schema['@type'] ) ) {
continue;
<?php
// If you want to add something before the form start
add_action( 'directorist_before_add_listing_from_frontend', function() {
?>
<!-- Add your code here -->
<?php
} );
// If you want to add something after the form end
add_action( 'directorist_after_submit_listing_frontend', function() {

The company is a travel start up from Heidelberg, Germany. We are building a web application where users can create personalized backpacking trips.

In Heidelberg or remote we are looking for reinforcement (m/f/d) in the area of web development.

Tasks

As a developer you need to be able to build the APIs using any of the following technologies:

Django Rest Framework, Flask, FASTApi. Moreover, since we need a huge data, writing scrapers must not be a problem for you. You have to know both of the following technologies for scraping: BeautifulSoup, Selenium. All the data should be constantly being collected on the server, hence, we need you to write an elegantly scheduled tasks using Celery (with properly configured brokers) and applying multiprocessing. Since the data is tremendous we are using the databases like PostgreSQL, MySQL, MongoDB.

@obiPlabon
obiPlabon / add-ajax-extended.php
Last active May 12, 2021 12:53
Register ajax action hook.
<?php
/**
* Register ajax action hook.
*
* When you have lots of ajax actions in your theme or plugin then
* this utility function is going to be quite handy!
* By default all actions are for logged in users.
*
* Usage:
* add_ajax( 'get_infinity_posts', 'prefix_get_infinity_posts' ); // for logged in only