Skip to content

Instantly share code, notes, and snippets.

Quinn Chaffee chaffeqa

Block or report user

Report or block chaffeqa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 2019-nfl-reg-season.json
{
"combined": {
"poolCount": 31751,
"maxEntriesPerUser": {
"1": 31751
},
"spreadType": {
"STRAIGHT_UP": 21916,
"CBS_SPREAD": 9835
},
@chaffeqa
chaffeqa / site.js
Created Apr 7, 2018
Example usage of custom DTM setup
View site.js
window._satellite.pageBottom();
var dataLayer = {};
window._satellite.setVar('dataLayer', window.dataLayer);
// apply defaults that persist throughout session:
Object.assign(dataLayer, {
eVar1: '...',
channel: '...',
heir: '...',
});
@chaffeqa
chaffeqa / custom.js
Created Apr 7, 2018
Adobe DTM events custom code
View custom.js
var id, mbatcher = /event/, val, events = [], linkTrackEvents = [], s_code = arguments[1], dataLayer = s_code.w._satellite.data.customVars.dataLayer || s_code.w._satellite.getVar('dataLayer'), log = s_code.w._satellite.Logger.echo;
for ( id in dataLayer){
val = dataLayer[id]
if (mbatcher.test(id) && val) {
log('debug',"Event detected: " + id + '=' + val);
linkTrackEvents.push(id);
events.push(id);
}
}
s_code.events = events.join(',');
@chaffeqa
chaffeqa / example.js
Created Sep 21, 2016
UI Redux Global Store
View example.js
import { toggleElementAction, connect } from 'common';
function Dropdown({ uid, ui, dispatch }){
return (
<button type="button"
onClick={ dispatch(toggleElementAction('dropdown', uid)) }
className={ ui.dropdown == uid ? 'dropdown--toggled' : 'dropdown' }>
Toggle Dropdown: '{uid}'
</button>
)
@chaffeqa
chaffeqa / callbacks.js
Created Apr 15, 2016
Candidate Questions
View callbacks.js
function meth1(){
return 1;
}
function meth2(input){
return 2 + input;
}
function result(arg1, cb){
var result = typeof(cb) == "function" && cb(arg1)
return result
}
@chaffeqa
chaffeqa / 0_reuse_code.js
Created Apr 8, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@chaffeqa
chaffeqa / generateRunsFor.js
Created Apr 7, 2016
A helper function for NCAA Bracket Challenge
View generateRunsFor.js
var _generateRunsFor = function( entry ){
debugGroupCollapsed('_generateRunsFor');
var
picks = entry.picks
,props = DataHandler.game.props
,key = ''
,propId, i, prop, pick
,runs = [], run, runI = 0
,longestI = -1, longestRunCnt = 0
,answerWithTie
View sampleCalls.js
// original s_code (AppMeasurements) use:
s.pageName="leaderboard"
s.heir="ncaa:bcg:leaderboard"
s.channel="ncaa|bcg|leaderboard"
s.eVar3="men"
s.eVar4="ncaa"
// ...more eVar / prop setting
s.t()
// This would fire a pixel with ?v3="men"&v4="ncaa"&p="leaderboard" ... ect
View process_feed.rb
# peter tyrrell - 1/2016
################################################################
# ProcessFeed
#
# .parse
# ---------------------------------------------------------------
# This routine can accept four OPTIONAL parameters
# example calls:
# ProcessFeed.parse(sim_online_state:ProcessFeed::SIM_FORCE, sim_round:400, sim_state:ProcessFeed::SIM_IN_PROGRESS)
# ProcessFeed.parse(feed_uri:'https://feeds.pgatourhq.com/DDManager/DDClient.do?clientFile=SyndFullLeaderboard&action=Request&u=sportstechinc&p=Z17t0vF4!!&T_ID=R2015470&R_NUM=1', sim_online_state:ProcessFeed::SIM_FORCE)
View .gitconfig
[user]
name = Your Name
email = youremail@u.com
[alias]
co = checkout
[color]
diff = auto
status = auto
branch = auto
[core]
You can’t perform that action at this time.