This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Send an event to GA whenever a user is about to initiate payment. | |
* | |
* The event is fired not just after the user clicks on the "Place Order" | |
* button, but when WooCommerce is actually going to redirect the user | |
* to the Payment Gateway, using the woocommerce_checkout_order_processed | |
* action. | |
* | |
* Furthermore, additional information is passed with the event: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Return the client's IP address. | |
* | |
* Returns the IP address if found, an empty string if not. The | |
* output is santized via FILTER_VALIDATE_IP. | |
* | |
* The algorithm uses the HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR | |
* globals to infer the IP address; if they are not available (as | |
* it is the case in most cases), it uses the REMOTE_ADDR global. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Print to screen and save to file the most important global PHP | |
* variables: _POST, _GET, _SERVER, _FILES, _REQUEST. | |
* | |
* As an alternative, consider also the free service http://requestb.in/. | |
* | |
* Created by Guido W. Pettinari on 06/06/2016. | |
* Latest version: https://gist.github.com/2eae82be7d5b4c35dbfd73fcf5c7eefb | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Subscribe user in MailUp upon form completion, using MailUp | |
* HTTP API. | |
* | |
* To hook into the form submission we use button click rather than | |
* actual submission, because the latter approach (using $('form').submit) | |
* does not seem to work. | |
* | |
* The MailUp API specifications can be found here: | |
* http://help.mailup.com/display/mailupapi/HTTP+API+Specifications |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Disable all Dashboard Widgets. | |
* | |
* Inspired by https://digwp.com/2014/02/disable-default-dashboard-widgets/. | |
* | |
* Created on 30/4/2016 by Guido W. Pettinari | |
* Latest version: https://gist.github.com/b10f4d0bf50b8f359b52d0bc50203650 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* PHP script to find duplicates & unique entries among two | |
* separate files. | |
* | |
* The script outputs one file with the matching lines and | |
* one with the unique ones. | |
* | |
* Example: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
######################################################### | |
--------------------------------------------------------- | |
-- Fix tabindex in Gravity forms | |
--------------------------------------------------------- | |
######################################################### | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Login string: http://webmail.mydomain.com/CardDAV | |
CONNECTION OK | |
<?xml version="1.0"?> | |
<D:multistatus xmlns:B="urn:ietf:params:xml:ns:carddav" xmlns:D="DAV:" xmlns:S="http://calendarserver.org/ns/"> | |
<D:response> | |
<D:href>/CardDAV/</D:href> | |
<D:propstat> | |
<D:prop> | |
<D:supported-report-set> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
/** | |
* Script to convert input files from vGroup format to vCard | |
* format. | |
* | |
* The output files will have the .csv extensions appended; | |
* a backup of each existing output file will be created with |