Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Agustin Mouratoglou amouratoglou

🎯
Focusing
  • Cordoba, Argentina
View GitHub Profile
@amouratoglou
amouratoglou / woocommerce-taxonomy-term-list-with-featured-image-for-loop.php
Last active Jun 1, 2020
Woocommerce Taxonomy Term list with featued image for loop
View woocommerce-taxonomy-term-list-with-featured-image-for-loop.php
@amouratoglou
amouratoglou / javascript-promises-and-async.md
Last active Feb 8, 2020
Javascript Promises and Async Programming
View javascript-promises-and-async.md

Introduction

This document has notes related with Javascript Promises and Async Programming

Promises in Javascript

  • Async Programming
  • Consuming and creating promises
  • Async Await
@amouratoglou
amouratoglou / array-key-value-foreach.php
Created Nov 24, 2019
Output array key and value foreach loop php
View array-key-value-foreach.php
<?php
$books["978"] = "Jjaj";
$books["978"] = "The Pepe";
$books["978"] = "Jackie's Fables";
$books["978"] = "Mahabhartazaa";
?><html>
<head>
@amouratoglou
amouratoglou / woocommerce_sql_scripts.sql
Last active Sep 11, 2019
Woocommerce product management SQL scripts
View woocommerce_sql_scripts.sql
/*
Make sure you execute the script in the right database!
- Delete all products -
Description: This script deletes all WooCommerce products
and their associations (categories/taxonomies and terms info)
*/
DELETE relations.*, taxes.*, terms.*
@amouratoglou
amouratoglou / wordpress_taxonomy_term_title_and_slug
Last active Aug 19, 2019
Wordpress Show Taxonomy Term Title and Slug inside loop #wordpress
View wordpress_taxonomy_term_title_and_slug
<?php
// Print term slug
$terms = get_the_terms( $post->ID , 'oil' );
if ( $terms != null ){
foreach( $terms as $term ) {
print $term->slug ;
unset($term);
} }
// Get term title
@amouratoglou
amouratoglou / wordpress-ajax-load-posts.php
Last active Aug 3, 2019
Get AJAX posts in Wordpress #ajax #wordpress #javascript
View wordpress-ajax-load-posts.php
// the function returns HTML directly using a custom template
// add this to your functions.php or create a plugin
function get_ajax_posts()
{
// Query Arguments
$args = array(
'post_type' => 'post',
View rename_woocommerce_name_dashboard_menu_wordpress.php
// Rename WooCommerce to Store in the dashboard
// add this function to your functions.php file
// or create a plugin with it.
add_action( 'admin_menu', 'rename_woocoomerce', 999 );
function rename_woocoomerce()
{
global $menu;
@amouratoglou
amouratoglou / function_query_woocommerce_subcategory_thumbnail_featured_image.php
Last active Jun 1, 2020
Wp Woocommerce Subcategory Loop showing featured image in tumbnail size
View function_query_woocommerce_subcategory_thumbnail_featured_image.php
View mongo.txt
MONGO SHELL
---------------------------
mongo "mongodb+srv://clustertest-rrpc1.mongodb.net/test" --username m001-student
password
show dbs
use [databasename]
You can’t perform that action at this time.