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

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
@obiPlabon
obiPlabon / search-by-id.php
Created May 3, 2021 09:11
WP Search by ID and fallback to regular search query
<?php
/**
* Search by post ID when integer is available in search terms.
* Fallback to regular query when integer is absent.
*
* @param string $search Search sql query string
* @param WP_Query $query
*
* @return string
*/
@obiPlabon
obiPlabon / wp-add-ajax-utility.php
Last active April 12, 2021 03:09
Utility function to add ajax action
<?php
/**
* Add WP ajax action with ease.
*
* @param string $action Ajax action name
* @param callable $callback Ajax callback function
* @param bool $is_nopriv Whether privileged request or not
*/
function add_ajax( $action, $callback, $is_nopriv = false ) {
if ( empty( $action ) || ! is_callable( $callback ) ) {
@obiPlabon
obiPlabon / do-shortcode-callback.php
Created March 8, 2021 09:56
Call a shortcode function by tag name
<?php
/**
* Call a shortcode function by tag name.
*
* @param string $tag The shortcode whose function to call.
* @param array $atts The attributes to pass to the shortcode function. Optional.
* @param array $content The shortcode's content. Default is null (none).
*
* @return string|bool False on failure, the result of the shortcode on success.
*/
@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 / wp-pagination-issue-on-static-home-page.php
Created February 2, 2021 15:12
Solution for WP pagination issue on static home page which occurred due to global $paged variable
<?php
global $paged;
// Store the global {$paged} value in a temporary {$_temp_paged} variable
$_temp_paged = $paged;
// Figure out the current page number
$_paged = get_query_var( 'paged' );
$_paged = ( ! empty( $paged ) ? $paged : get_query_var( 'page', 1 ) );
@obiPlabon
obiPlabon / elementor-disable-all-wp-widgets.php
Last active December 20, 2020 17:39
Disable or remove elementor widget from editor panel
<?php
/**
* Disable elementor registered widget.
*
* This will disable all WordPress native widgets
*
* @param \Elementor\Widgets_Manager $widgets_manager Instance of elementor widgets manager
*
* @author obiPlabon <https://obiPlabon.im>
*
@obiPlabon
obiPlabon / elementor-assign-category-snippet.php
Created December 11, 2020 10:44
Asssign any elementor widget to a different category
<?php
/**
* Asssign any elementor widget to a different category
*
* To override the existing category just pass [ 'your-custom-category' ]
* And to keep existing [ 'your-custom-category', 'basic' ]
* here 'your-custom-category' is any registered category slug
*
* @param array $config
@obiPlabon
obiPlabon / for-rasel-bro.php
Last active November 23, 2020 23:57
Elementor snippet to get the option name from a repeater select field by passing option key
<?php
'title_field' => "<#
// This snippet doesn't ensure that it won't throw any error if there's no row/repeater item
// Make sure to check that
// First get the repeater control
var repeaterControl = elementor.getPanelView().getCurrentPageView().children.find(function(view) {
return view.model.get('name') === 'staffs';
}),