Skip to content

Instantly share code, notes, and snippets.

View JEverhart383's full-sized avatar

Jeff Everhart JEverhart383

View GitHub Profile
@JEverhart383
JEverhart383 / wp-query-ref.php
Created July 26, 2017 17:46 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
{
"success": true,
"result": {
"count": 309,
"measurements": {
"salePrice": {
"average": 898348.3836,
"median": 902000,
"low": 332500,
"high": 1780000,
{
"success": true,
"result": {
"count": 532,
"measurements": {
"salePrice": {
"average": 1076607.2094,
"median": 1055000,
"low": 350000,
"high": 3250000,
{
"success": true,
"result": {
"count": 412,
"measurements": {
"salePrice": {
"average": 1075667,
"median": 1040000,
"low": 390000,
"high": 2310000,
{
"success": true,
"result": {
"total": 4,
"schools": [
{
"id": "A0900540",
"name": "Skylar Hadden School",
"geoType": "school",
"label": "Skylar Hadden School, San Jose, CA",
<script type="text/javascript">
console.log("script rendered");
var topicSort = {
parentTopics: $(".categories>ul>li>h4"),
initTopicSort: function () {
var topicSort = this;
@JEverhart383
JEverhart383 / mailApp.js
Created April 1, 2016 13:31
This is a basic example of how to grab a user email from a form submission and send them an email
function myFunction(e){
//pass inital event parameter to access form responses
//use e.values to get whatever form values you want
var userEmail = e.values[1];
//use MailApp.sendEmail to send email
var subject = "Email Sent from Google Form";
var body = "Email sent from google forms body";
MailApp.sendEmail(userEmail, subject, body);
function myFunction() {
function calcPercent(totalPts, scoredPts, percentValue) {
return (scoredPts/totalPts)*percentValue;
}
var ss = SpreadsheetApp.getActiveSheet();
var dataRange = ss.getDataRange();
var dataValues = dataRange.getValues();
@JEverhart383
JEverhart383 / get_derelicts.php
Last active March 3, 2016 19:19 — forked from woodwardtw/get_derelicts.php
wordpress multisite query to get the 50 blogs that have gone the longest without being updated
<?php
/**
* Plugin Name: Abandoned WP Plugin
* Plugin URI: https://gist.github.com/woodwardtw/cf706545a064a02fbd60
* Description: This plugin finds abandoned WP site (by last update) on a WP MU installation and provides links to WP site and mailto
* Version: 1.0.0
* Author: Tom Woodward (og script), Jeff Everhart(plugin shell and implementation)
* Author URI: https://gist.github.com/woodwardtw/cf706545a064a02fbd60
* License: GPL2
*/