Skip to content

Instantly share code, notes, and snippets.

View JEverhart383's full-sized avatar

Jeff Everhart JEverhart383

View GitHub Profile
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
function sendFormByEmail(e)
{
var email = "digitaledcollaborator@gmail.com";
var becky = "dec@longwood.edu";
var subject = "Google Docs Form Submitted";
var s = SpreadsheetApp.getActiveSheet();
var headers = s.getRange(1,1,1,s.getLastColumn()).getValues()[0];
/* Send Confirmation Email with Google Forms */
function Initialize() {
var triggers = ScriptApp.getProjectTriggers();
for (var i in triggers) {
ScriptApp.deleteTrigger(triggers[i]);
}
function formSubmitReply(e) {
var userEmail = “example@gmail.com”;
var name = e.values[2];
var letterdraft = e.values[1] + " " + e.values[2];
var letterdraftHTML = '<p>' + e.values[1] + " " + e.values[2] +' </p>';
GmailApp.sendEmail (userEmail, name, letterdraft, {htmlBody: letterdraftHTML, name: name, replyTo: e.values[4], cc: “another@gmail.com, thirdemail@gmail.com“});
}
@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
*/
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 / 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);
<script type="text/javascript">
console.log("script rendered");
var topicSort = {
parentTopics: $(".categories>ul>li>h4"),
initTopicSort: function () {
var topicSort = this;
{
"success": true,
"result": {
"total": 4,
"schools": [
{
"id": "A0900540",
"name": "Skylar Hadden School",
"geoType": "school",
"label": "Skylar Hadden School, San Jose, CA",