Skip to content

Instantly share code, notes, and snippets.

View monteith's full-sized avatar

Graham Monteith monteith

View GitHub Profile
@monteith
monteith / segment-dy.js
Last active August 26, 2022 16:30
Segment to DY function
// Learn more about destination functions API at
// https://segment.com/docs/connections/destinations/destination-functions
/**
* Handle identify event
* @param {SegmentIdentifyEvent} event
* @param {FunctionSettings} settings
*/
let defaultEventBody = {
@monteith
monteith / vscode-settings.json
Last active February 1, 2021 16:22
vscode settings
{
// Typeface Settings
"editor.fontFamily": "'Fira Code Retina', Menlo, Monaco, 'Courier New', monospace",
"editor.fontSize": 16,
"editor.fontLigatures": true,
// Formatting
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"editor.cursorSmoothCaretAnimation": true,
@monteith
monteith / vscode-settings.md
Created February 1, 2021 16:20
vscode-settings
{
  // Typeface Settings
  "editor.fontFamily": "'Fira Code Retina', Menlo, Monaco, 'Courier New', monospace",
  "editor.fontSize": 16,
  "editor.fontLigatures": true,

  // Formatting
  "editor.codeActionsOnSave": {
    "source.fixAll": true
@monteith
monteith / bed-quiz.md
Last active October 16, 2020 14:32
AnalyticsAction Payloads
  {
      type: AnalyticsAction.BedQuizAnswer,
      payload: {
        question,
        answer,
      },
    }
@monteith
monteith / cookies.js
Last active July 25, 2020 03:22
Analytics: Data Elements Snippets
"created_at": "2020-07-21T21:22:04.507Z",
"deleted_at": null,
"dirty": false,
"enabled": true,
"name": "Pulse ID",
"published": false,
"published_at": null,
"revision_number": 0,
"updated_at": "2020-07-21T21:22:04.507Z",
"clean_text": false,
@monteith
monteith / playground.json
Last active July 25, 2020 03:03
Analytics: Data Elements (Custom Code)
{
"scripts": [],
"showConsole": true
}
@monteith
monteith / global-variables.md
Last active July 19, 2020 14:58
Adobe Analytics Notes

Site Configuration

Data Elements

Custom Scripts

  • %Blog Subdomain Page Name%
  • %Card Type%
  • %Checkout Login Email%
  • %CoreMetrics ID%

Keybase proof

I hereby claim:

  • I am monteith on github.
  • I am g12h (https://keybase.io/g12h) on keybase.
  • I have a public key ASCSdllu-cuEbm06RS1q3FIAN5W-Yp9TzQ0CPh9FJENw8wo

To claim this, I am signing this object:

@monteith
monteith / redditrx.js
Created May 20, 2017 19:56
reddit rx
const nextButton = document.getElementById("next");
const backButton = document.getElementById("back");
const subSelect = document.getElementById("sub");
const img = document.getElementById("img");
const loading = document.getElementById("loading");
const LOADING_ERROR_URL = "https://jhusain.github.io/reddit-image-viewer/error.png";
const Observable = Rx.Observable;
// function which returns an array of image URLs for a given reddit sub
@monteith
monteith / git-cheat-list.md
Created February 17, 2017 19:17
Git cheat list

Git cheat list

  • name of the current banch and nothing else (for automation)

    git rev-parse --abbrev-ref HEAD
    
  • all commits that your branch have that are not yet in master

    git log master..<HERE_COMES_YOUR_BRANCH_NAME>