Skip to content

Instantly share code, notes, and snippets.

@phillipwilhelm
phillipwilhelm / Email-verifier.js
Created Aug 11, 2022 — forked from augfrank/Email-verifier.js
Google Sheet script to verify email addresses automatically
View Email-verifier.js
/**
* A custom function that verifies an email ID
*
* @param {String} email ID
* @return {Boolean} If the email ID is active
* @customfunction
*/
function verifyEmail(email) {
// Replace this with your Hunter.io API key
@phillipwilhelm
phillipwilhelm / note.txt
Created Aug 7, 2022 — forked from rksk/note.txt
MySQL: Logging table changes into another table using triggers
View note.txt
This is related to the blog post: https://medium.com/p/5215c77083e5
@phillipwilhelm
phillipwilhelm / submit.md
Created Jun 16, 2022 — forked from tanaikech/submit.md
Letting Users Running Google Apps Script on Google Spreadsheet without both Authorizing Scopes and Showing Script
View submit.md

Letting Users Running Google Apps Script on Google Spreadsheet without both Authorizing Scopes and Showing Script

This is a sample workaround for letting users running Google Apps Script on Google Spreadsheet without both authorizing the scopes and showing the script.

The flow of this workaround is as follows.

  1. Create Web Apps created by Google Apps Script and deploy it as Web Apps. As the returned value, the XML data is returned.
    • Your script can be included in this script.
  2. User put a formula of =IMPORTML("WebApps URL", "xpath") to a cell.
@phillipwilhelm
phillipwilhelm / exportSpreadsheet.gs
Created Jun 16, 2022 — forked from Spencer-Easton/exportSpreadsheet.gs
Example on how to export a Google sheet to various formats, includes most PDF options
View exportSpreadsheet.gs
function exportSpreadsheet() {
//All requests must include id in the path and a format parameter
//https://docs.google.com/spreadsheets/d/{SpreadsheetId}/export
//FORMATS WITH NO ADDITIONAL OPTIONS
//format=xlsx //excel
//format=ods //Open Document Spreadsheet
//format=zip //html zipped
@phillipwilhelm
phillipwilhelm / custom google apps scripts for tech sales
Created Jun 16, 2022 — forked from nvahalik/custom google apps scripts for tech sales
Some Google Apps Script functions for Spreadsheets which might be useful for those in Technical Sales or software development. They can be used to add up and manipulate hour ranges (e.g. SUMRANGE(["1-2",2,"2-5"]) would yield "5-9"). Those functions are SUMRANGE, SUMRANGEHIGH, SUMRANGELOW, RANGEMULT, and RANGEADD. There are also some functions wh…
View custom google apps scripts for tech sales
/* Grab the values and make them globally available. */
var hoursPerDay = 8;
var hoursPerWeek = hoursPerDay * 5;
/**
* We calculate the number of hours in a given range.
*/
function SUMTIME(allData) {
var numHours = 0;
var numCells = allData.length;
@phillipwilhelm
phillipwilhelm / gist:e2edabad1d5c7a811e8e8547b15acb07
Created Jun 1, 2022 — forked from filipbec/gist:5998034874b119fab0e4
Scannr - Keys for obtaining US Driver's license data
View gist:e2edabad1d5c7a811e8e8547b15acb07
@phillipwilhelm
phillipwilhelm / bing-ads-stats-to-google-sheet.js
Created Mar 23, 2022 — forked from krsoninikhil/bing-ads-stats-to-google-sheet.js
Bing Ads Script To Push Campaign Stats To Google Spreadsheet
View bing-ads-stats-to-google-sheet.js
function main() {
var payload = {"channel": "bing", "reports": []};
var date = new Date();
date.setDate(date.getDate() - 1);
var yesterday = date.toISOString().split('T')[0];
var rows = AdsApp.campaigns().forDateRange('YESTERDAY').withCondition('Impressions > 0').get();
while (rows.hasNext()) {
var campain = rows.next()
var row = campain.getStats();
@phillipwilhelm
phillipwilhelm / gist:8ace354784ee5a52094d1259bad75cad
Created Mar 23, 2022 — forked from digitaljhelms/gist:3761873
Git/GitHub commit standards & conventions
View gist:8ace354784ee5a52094d1259bad75cad

Committing Code

General Rules

  • Make atomic commits of changes, even across multiple files, in logical units. That is, as much as possible, each commit should be focused on one specific purpose.
  • As much as possible, make sure a commit does not contain unnecessary whitespace changes. This can be checked as follows:
$ git diff --check
@phillipwilhelm
phillipwilhelm / gist:16764934dd00676c5b53d341694fc716
Created Mar 23, 2022 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions
View gist:16764934dd00676c5b53d341694fc716

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch