- convert the signature image to PDF file
convert firma.png firma.pdf
# Basic queries to analyse canceled subscriptions using EDD Recurring Payments pre EDD 3.0 | |
# Use EXPLAIN if you have large stores since the "notes" column is not indexed and queries can take some time | |
# Some of these reports might be worth storing as Views and look at the graphs PHPMyAdmin can also create from them | |
# List subscription cancelation with creation and cancelation date, as well as the user who canceled | |
# good as a basis for further queries | |
SELECT ID, | |
created, | |
REGEXP_SUBSTR( REGEXP_SUBSTR( notes, '.* Status changed from active to cancelled .*' ), '^[a-z]+ [0-9]+, [0-9]+' ) AS 'date', |
# THIS IS NOT TESTED ENOUGH !!!!!!!!!!!!!!!!!! EXPECT INACCURACIES !!!!!!!!!!!!!!!!!! | |
# THIS IS CRAZY CRAZY SLOW | |
# ADJUST THE LIMIT ON LINE 20 ACCORDINGLY (READ: IF YOU DARE) | |
SELECT * | |
FROM ( | |
SELECT | |
SUBSTRING_INDEX(SUBSTRING_INDEX(edd_customers.name, ' ', 1), ' ', -1) as firstname, | |
edd_customers.email AS email, | |
pm2.meta_value as license_key | |
FROM wp_edd_customers AS edd_customers |
#!/usr/bin/env bash | |
# =============================================================================== | |
# Script to install PHPUnit in the Local by Flywheel Mac app | |
# These packages are installed | |
# | |
# PHPUnit, curl wget, rsync, git, subversion and composer. | |
# | |
# WordPress is installed in the `/tmp/wordpress` directory for use by PHPUnit. | |
# The WordPress test suite is installed in the `/tmp/wordpress-tests-lib` directory. |
<?php | |
/** | |
* Plugin Name: Double Post Type Rewrite Rule Example | |
* Plugin URI: https://gist.github.com/mattyza/7dfd156992f23835f68e | |
* Description: Adds a custom rewrite rule to mimic http://domain.com/post-type-01/post-type-02/. | |
* Author: Matty Cohen | |
* Author URI: http://matty.co.za/ | |
* Version: 1.0.0 | |
* Stable tag: 1.0.0 | |
* License: GPL v3 - http://www.gnu.org/licenses/old-licenses/gpl-3.0.html |
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
<?php | |
/** | |
* Scrape the number of podcast reviews from iTunes for all country specific storefronts. | |
* | |
* @author Sean Murphy <sean@iamseanmurphy.com> | |
*/ | |
$podcast_id = '366931951'; // Startups For the Rest of Us | |
//$podcast_id = '318567721'; // techzing |