Skip to content

Instantly share code, notes, and snippets.

View manutheblacker's full-sized avatar
🎯
Focusing

Emmanuel A. manutheblacker

🎯
Focusing
View GitHub Profile
<!-- wp:woocommerce/cart -->
<div class="wp-block-woocommerce-cart alignwide is-loading"><!-- wp:woocommerce/filled-cart-block -->
<div class="wp-block-woocommerce-filled-cart-block"><!-- wp:woocommerce/cart-items-block -->
<div class="wp-block-woocommerce-cart-items-block"><!-- wp:woocommerce/cart-line-items-block -->
<div class="wp-block-woocommerce-cart-line-items-block"> </div>
<!-- /wp:woocommerce/cart-line-items-block -->
<!-- wp:woocommerce/cart-cross-sells-block -->
<div class="wp-block-woocommerce-cart-cross-sells-block"><!-- wp:heading {"fontSize":"large"} -->
<h2 class="wp-block-heading has-large-font-size">You may be interested in…</h2>
@manutheblacker
manutheblacker / code.py
Created January 2, 2024 04:20
How to convert a Excel file into Json using Python Openpyxl ?
import openpyxl # pip install openpyxl
from var_dump import var_dump # pip install var_dump , this method has the same behaviour like the PHP ones.
import json
import datetime
now = datetime.datetime.now()
path = "./atarada.xlsx" # path to your xlsx file
wb_obj = openpyxl.load_workbook( path )
sheet_obj = wb_obj.active
@manutheblacker
manutheblacker / solution.md
Created December 10, 2023 14:34
How to do when Django signals isn't sending in production ?

Hello, I've encountered an issue with a Django project that I was running under CyberPanel 3.

Normally, under certain conditions, when new data is saved to the database, a new identifier is created for the field. While testing locally, it worked as expected, but in production, it failed to send.

After some research, I realized that signals must be loaded, either by adding them to the ready() method in the apps.py file, like this, and ensuring that the app is loaded into settings.py, as in my case: 'users.apps.UsersConfig'

class UsersConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'users'
@manutheblacker
manutheblacker / code.php
Created November 24, 2023 06:36
Query Woo products from a specific category, in stock and display in a loop
<?php
// display the title of the page related
add_filter('woocommerce_product_related_products_heading', '__return_false' );
// WC query of products of a specific categories and in stock.
$wc_query = wc_get_products( array(
'post_type' => 'product',
'post_status'=>'public',
'tax_query' => array(
@manutheblacker
manutheblacker / export.sql
Last active October 10, 2023 08:19
Exporting magento2 products details + webkul marketplace data
SELECT * FROM `marketplace_product`
INNER JOIN `catalog_product_entity` ON catalog_product_entity.entity_id = marketplace_product.mageproduct_id
INNER JOIN `catalog_product_index_price` ON catalog_product_index_price.entity_id = marketplace_product.mageproduct_id
INNER JOIN `marketplace_userdata` ON marketplace_userdata.seller_id=marketplace_product.seller_id
INNER JOIN `catalog_product_entity_varchar` ON catalog_product_entity_varchar.entity_id=marketplace_product.mageproduct_id
@manutheblacker
manutheblacker / readme.txt
Created September 5, 2023 07:02
How to run latest Mac version on old MacBook device ?
https://github.com/dortania/OpenCore-Legacy-Patcher/blob/main/SOURCE.md
[
{
"o-package-warehouse": "aerien",
"o-package-tracking": "jkh",
"o-package-qty": "5",
"o-package-total": "10000",
"o-package-content": "aerien",
"o-package-client": "",
"o-package-status": "",
"o-package-type": "Normal",
@manutheblacker
manutheblacker / mautic-issue-with-email.txt
Last active May 28, 2023 16:24
how to fix biggest issue with mautic 3, 4 and other versions
Follow the instructions mentionned here :
https://github.com/mautic/mautic/issues/3942
I've spent 4 days, 4 nights to fix this issue, please be careful with your mautic nginx configuration.
If you use apache, just chill and have a nice day.
@manutheblacker
manutheblacker / SkeletonLoader.vue
Created November 25, 2022 13:28 — forked from andresabello/SkeletonLoader.vue
A skeleton loader for Vue JS. You will need to implement the setLoadingState. This one is just an example that hides the element after 5 seconds.
<template>
<div class="container">
<div class="row" v-show="loading">
<div class="col-xl-4 pt-5">
<div class="placeholder wave">
<div class="square"></div>
<div class="line"></div>
<div class="line"></div>
</div>
</div>
@manutheblacker
manutheblacker / code.php
Last active November 5, 2022 17:23
How to send SMS & WhatsApp messages both at the same time in Ultimate SMS & WhatsApp Notifications for WooCommerce?
<?php
add_filter('woo_usn_send_only_sms', function( $must_be_sent ){
$must_be_sent = true;
return $must_be_sent;
}, 99);