Skip to content

Instantly share code, notes, and snippets.

View mvegap's full-sized avatar
👽
SE

Miguel Vega mvegap

👽
SE
View GitHub Profile
@mvegap
mvegap / pm2.txt
Created March 20, 2021 01:37 — forked from anmolnagpal/pm2.txt
Pm2 CheatSheet
Usage
Hello world:
$ pm2 start app.js
Raw Examples
# Fork mode
$ pm2 start app.js --name my-api # Name process
@mvegap
mvegap / plugins.php
Created October 20, 2020 02:27 — forked from anonymous/plugins.php
Add extra info to WooCommerce product
<?php
/**
* Plugin Name: Pharmacy
* Plugin URI: http://domain.com
* Description: Add extra info for pharmacy products
* Author: Your name
* Author URI: http:// domain.com
* Version: 1.0
*/
<?php
//set up pods::find parameters to limit to 5 items
$param = array(
'limit' => 5,
);
//create pods object
$pods = pods('pod_name', $params );
//check that total values (given limit) returned is greater than zero
if ( $pods->total() > 0 ) {