Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* The default template for displaying content
*
* Used for both single and index/archive/search.
*/
// woodmart_setup_loop();
$woodmart_loop = woodmart_loop_prop( 'woodmart_loop' );
$blog_design = woodmart_loop_prop( 'blog_design' );
<?php
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages and that other
* 'pages' on your WordPress site will use a different template.
*
* @package Woodmart
*/
@joradom
joradom / woocommerce-products.sql
Created December 7, 2020 17:51 — forked from mglaman/woocommerce-products.sql
MySQL query for wooCommerce to export products.
SELECT product.ID as product_id, product.post_title as product_name, replace(product.post_content, '"', "'") as product_content, product_sku.meta_value as product_sku, product_price.meta_value as product_price, product_weight.meta_value as product_weight
FROM wp_posts as product
LEFT JOIN wp_postmeta as product_sku ON product.ID = product_sku.post_ID
LEFT JOIN wp_postmeta as product_price ON product.ID = product_price.post_ID
LEFT JOIN wp_postmeta as product_weight ON product.ID = product_weight.post_ID
WHERE (product.post_type = 'product' OR product.post_type = 'product_variation') AND product_sku.meta_key = '_sku' AND product_price.meta_key = '_price' AND product_weight.meta_key = '_weight'
ORDER BY product_id ASC
@joradom
joradom / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created February 14, 2019 13:32 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@joradom
joradom / Ethereum_private_network.md
Created June 15, 2018 05:55 — forked from 0mkara/Ethereum_private_network.md
Ethereum private network configuration guide.

Create your own Ethereum private network

Introduction

Used nodes:

Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux
Linux localhost.localdomain 4.14.5-200.fc26.x86_64 #1 SMP Mon Dec 11 16:29:08 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
@joradom
joradom / EthereumNodeGCP.md
Created June 14, 2018 17:52 — forked from learner-long-life/EthereumNodeGCP.md
How to Run an Ethereum (Geth Light) Node on GCP

How to Run an Ethereum Node in GCP

The first step to setting up an Ethereum development environment is running a node. Public nodes run by MyEtherWallet and Augur are great public services. However, you cannot always attach your private keys securely to such a node, and so you are limited to read-only interactions (reading contract variables, checking account balances). Moreover, you cannot always upload contracts reliably due to (Solidity) compiler incompatibilities.

The Angular Service Worker

What is a service worker?

A service worker is a special script which runs in the background in the browser and manages network requests to a given origin. It's originally installed by an app and stays resident on the user's machine/device. It's activated by the browser when a page from its origin is loaded, and has the option to respond to HTTP requests during the page loading, including the initial navigation request (for /index.html). This makes service workers very useful for true offline support in applications.

Additionally, service workers are the client-side endpoint for push notifications on the web.

Features

@joradom
joradom / wordpress-plugin-svn-to-git.md
Created April 26, 2017 17:08 — forked from kasparsd/wordpress-plugin-svn-to-git.md
Using Git with Subversion Mirroring for WordPress Plugin Development
@joradom
joradom / update-to-php5.6-on-ubuntu-14.04.sh
Created April 24, 2017 15:10 — forked from eyecatchup/update-to-php5.6-on-ubuntu-14.04.sh
Update PHP 5.x to PHP 5.6 on Ubuntu 14.04
#!/bin/sh
# In case df shows >90% for /boot run:
#sudo apt-get autoremove
# Add repository
sudo add-apt-repository ppa:ondrej/php
# Install required packages
sudo apt-get update
@joradom
joradom / override_controllers_admin_AdminImportController.php
Created September 28, 2016 10:56 — forked from phproberto/override_controllers_admin_AdminImportController.php
Prestashop importer override to update prices without losing product names
<?php
class AdminImportController extends AdminImportControllerCore
{
public function __construct()
{
parent::__construct();
}