Check the drive number for your usb on windows using:
diskmgmt.msc
and looking for your USB drive.
Then, in a powershell admin terminal:
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
*/ |
/** drivingDistanceAndTime.gs **/ | |
/** Find the distance (in KM or MI) and driving time between locations | |
stored in Google Sheets. Distances and Time provided by Google Apps Script Maps Service */ | |
/** Note: This is built on top of Google App Scripts Code **/ | |
/** Licensed under the Apache 2.0 License **/ | |
/** By: Sandu Rajapakse - lankanmon **/ | |
/** === USAGE INSTRUCTIONS === | |
To use these functions in Google Sheets, place this code in a new script in the Script Editor. |
<?php | |
/* | |
Plugin Name: Disable WooCommerce REST API authentication | |
Plugin URI: https://www.damiencarbery.com/2019/07/disable-woocommerce-rest-api-authentication/ | |
Description: Override WooCommerce capability check so that all REST API queries from specified IP are allowed | |
Author: Damien Carbery | |
Version: 0.1 | |
*/ |
{ | |
"id": 7755, | |
"parent_id": 0, | |
"number": "7755", | |
"order_key": "wc_order_YjITxJBWgJIFu", | |
"created_via": "programatically", | |
"version": "3.6.4", | |
"status": "completed", | |
"currency": "EUR", | |
"date_created": "2019-06-11T08:58:35", |
<?php | |
/* | |
// Restrict who can access this script. | |
$permitted_ips = array('12.34.56.78', '87.65.43.21'); | |
if (in_array($_SERVER['REMOTE_ADDR'], $permitted_ips) == false) { | |
header('HTTP/1.0 403 Forbidden'); | |
die(); | |
} | |
*/ |
add_filter( 'gform_form_post_get_meta_7', 'add_form_fields' ); | |
function add_form_fields( $form ) { | |
// Don't make the parent form messy | |
if ( ! GFCommon::is_form_editor() ) { | |
// form we are adding fields to | |
$parent_id = $form['id']; | |
// template form ID | |
$childId = 5; |
<?php | |
/** | |
* Save Gravity Form field data to post meta by adding a class to any field. | |
* Meta is mapped so that it is readable by Advanced Custom Fields | |
* Format class as… | |
* post_meta-{meta_key} -- for simple fields & writing lists as array to single meta record | |
* post_meta-{meta_key}-.3 -- for multi-input fields | |
* post_meta-{repeater_key}-1.{meta_key} -- for list fields mapped to meta readable by ACF | |
*/ | |
// Run this function after the Gravity Form has created a post |
wget -i image-list.txt --force-directories |
Check the drive number for your usb on windows using:
diskmgmt.msc
and looking for your USB drive.
Then, in a powershell admin terminal:
.\ps2exe.ps1 ..\form.ps1 -outputFile output.exe -requireAdmin -noConfigFile -noConsole -noError -nooutput -x64 -runtime40 | |
from | |
https://gallery.technet.microsoft.com/scriptcenter/PS2EXE-GUI-Convert-e7cb69d5 |