Skip to content

Instantly share code, notes, and snippets.

@phillipwilhelm
phillipwilhelm / gist:e2edabad1d5c7a811e8e8547b15acb07
Created June 1, 2022 16:45 — forked from filipbec/gist:5998034874b119fab0e4
Scannr - Keys for obtaining US Driver's license data
@phillipwilhelm
phillipwilhelm / bing-ads-stats-to-google-sheet.js
Created March 23, 2022 17:36 — forked from krsoninikhil/bing-ads-stats-to-google-sheet.js
Bing Ads Script To Push Campaign Stats To Google Spreadsheet
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 March 23, 2022 01:43 — forked from digitaljhelms/gist:3761873
Git/GitHub commit standards & conventions

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 March 23, 2022 01:41 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@phillipwilhelm
phillipwilhelm / Function.Date-Format-Conversion.php
Created January 19, 2022 04:59 — forked from mcaskill/Function.Date-Format-Conversion.php
PHP : Translate date/time format between `date()` and `strftime()`
<?php
/**
* Convert date/time format between `date()` and `strftime()`
*
* Timezone conversion is done for Unix. Windows users must exchange %z and %Z.
*
* Unsupported date formats : S, n, t, L, B, G, u, e, I, P, Z, c, r
* Unsupported strftime formats : %U, %W, %C, %g, %r, %R, %T, %X, %c, %D, %F, %x
*
@phillipwilhelm
phillipwilhelm / index.html
Created January 14, 2022 04:07
Local storage shopping basket
<div class='menu'>
<svg class ='basket' width="24" height="24" viewBox="0 0 24 24">
<path d="M17,18C15.89,18 15,18.89 15,20A2,2 0 0,0 17,22A2,2 0 0,0 19,20C19,18.89 18.1,18 17,18M1,2V4H3L6.6,11.59L5.24,14.04C5.09,14.32 5,14.65 5,15A2,2 0 0,0 7,17H19V15H7.42A0.25,0.25 0 0,1 7.17,14.75C7.17,14.7 7.18,14.66 7.2,14.63L8.1,13H15.55C16.3,13 16.96,12.58 17.3,11.97L20.88,5.5C20.95,5.34 21,5.17 21,5A1,1 0 0,0 20,4H5.21L4.27,2M7,18C5.89,18 5,18.89 5,20A2,2 0 0,0 7,22A2,2 0 0,0 9,20C9,18.89 8.1,18 7,18Z"></path>
</svg>
<h1> Local storage basket</h1>
</div>
<div class = 'menu__container'>
</div>
@phillipwilhelm
phillipwilhelm / hexToCssFilters.ts
Created October 31, 2021 21:52 — forked from dwjohnston/hexToCssFilters.ts
TS Hex to CSS filters solution
//As referenced in this solution
import { number } from "prop-types";
//https://codepen.io/sosuke/pen/Pjoqqp
interface HSL {
h: number;
@phillipwilhelm
phillipwilhelm / split-string-into-rows.sql
Created October 26, 2021 06:56 — forked from duanehutchins/split-string-into-rows.sql
MySQL split comma-separated string into rows
-- split-string-into-rows.sql
-- Duane Hutchins
-- https://www.github.com/duanehutchins
-- Split a string into a mysql resultset of rows
-- This is designed to work with a comma-separated string (csv, SET, array)
-- To use a delimiter other than a comma:
-- Just change all the occurrences of ',' to the new delimiter
-- (four occurrences in SET_EXTRACT and one occurrence in SET_COUNT)
@phillipwilhelm
phillipwilhelm / submit.md
Created September 13, 2021 02:33 — forked from tanaikech/submit.md
Enhanced onEdit(e) using Google Apps Script

Enhanced onEdit(e) using Google Apps Script

onEdit(e) which is used for the Edit event on Spreadsheet has the old value as e.oldValue. The specifications for this are as follows.

  1. When an user edited a single "A1" cell, e of onEdit(e) shows hoge for e.oldValue and fuga for e.value.
  2. When an user edited the "A1:A2" multiple cells, e.oldValue and e.value of onEdit(e) are not shown anything.
  3. When an user copied and pasted from other cell, e.oldValue and e.value of onEdit(e) are not shown anything.

This sample script was created to retrieve both the edited values and the old values for the range of edited cells. This is the modified e.oldValue.