Skip to content

Instantly share code, notes, and snippets.

View cwparsons's full-sized avatar

cwparsons

View GitHub Profile
@cwparsons
cwparsons / _User-specific gulp configuration.md
Last active July 10, 2018 23:53
User configuration for a gulpfile.

We use the following to allow different users or computers to have their own gulp configuration.

@cwparsons
cwparsons / _User-specific gulp tasks.md
Last active July 10, 2018 23:53
Allow other developers to create their own gulp tasks.

We use the following to allow developers to have their own specific gulp tasks.

@cwparsons
cwparsons / _Telemetry data.md
Last active July 10, 2018 23:52
Capture telemetry data within a gulp task.

We use the following to track gulp tasks in Google Analytics.

@cwparsons
cwparsons / gtm-send-tag-to-multiple-tracking-ids.js
Last active June 22, 2018 18:34
Send an event to multiple
/**
* # Usage
*
* 1. On an individual tag, update the tag configuration to have a new *Field to set*.
* 2. Set the field name to `customTask`.
* 3. Create a new variable for the value using the *Custom JavaScript* variable type.
* 4. Use below for the custom JavaScript.
*/
function() {

Keybase proof

I hereby claim:

  • I am cwparsons on github.
  • I am cparsons (https://keybase.io/cparsons) on keybase.
  • I have a public key whose fingerprint is FCCB DC0A 8EBB 7A7C 36B8 6A8F D7C7 AAF6 2F6F 686F

To claim this, I am signing this object:

import React from 'react';
import PropTypes from 'prop-types';
import { render, Document, Page, Artboard, Text, View } from 'react-sketchapp';
import items from './items.json';
const groupLength = 2;
let groups = [];
for (var i = 0; i < items.length; i += groupLength) {
groups.push(items.slice(i, i + groupLength));

MLB teams seen (17/30)

American League

AL East

  • ✓ Baltimore
  • ✓ Boston
  • ✓ NY Yankees
  • ✓ Tampa Bay
@cwparsons
cwparsons / Control_Default.html
Created November 23, 2016 18:05
The default control display template for SharePoint.
<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
<head>
<title>Default Control Display Template</title>
<!--[if gte mso 9]><xml>
<mso:CustomDocumentProperties>
<mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
<mso:MasterPageDescription msdt:dt="string">This is the default Control Display Template that will list the items. It does not allow the user to page through items.</mso:MasterPageDescription>
<mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106601</mso:ContentTypeId>
<mso:TargetControlType msdt:dt="string">;#Content Web Parts;#</mso:TargetControlType>
<mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
@cwparsons
cwparsons / script.js
Last active August 9, 2024 20:40
A basic custom Google Sheets script that adds weather to our holiday sheet.
/**
* Update the protected weather column.
*/
function onOpen() {
var spreadsheet = SpreadsheetApp.getActive();
var menuItems = [
{
name: "Update weather column",
functionName: "updateWeather"
@cwparsons
cwparsons / gulpfile.js
Last active February 16, 2016 22:37
A simple gulpfile for legacy SharePoint projects that use MSBuild targets.
/*!
* Front end build and development scripts for Client.Internet.WebSite
*/
// Dependencies
var exec = require('gulp-exec'),
gulp = require('gulp'),
gutil = require('gulp-util'),
livereload = require('gulp-livereload'),
watch = require('gulp-watch');