This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if Rails.env.development? | |
| def os | |
| @os ||= ( | |
| host_os = RbConfig::CONFIG['host_os'] | |
| case host_os | |
| when /mswin|msys|mingw|cygwin|bccwin|wince|emc/ | |
| :windows | |
| when /darwin|mac os/ | |
| :macos | |
| when /linux/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # typed: true | |
| module AllCachedModelConcern | |
| extend ActiveSupport::Concern | |
| included do | |
| after_save(:clear_all_cached!) | |
| after_destroy(:clear_all_cached!) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "combined": { | |
| "poolCount": 31751, | |
| "maxEntriesPerUser": { | |
| "1": 31751 | |
| }, | |
| "spreadType": { | |
| "STRAIGHT_UP": 21916, | |
| "CBS_SPREAD": 9835 | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| window._satellite.pageBottom(); | |
| var dataLayer = {}; | |
| window._satellite.setVar('dataLayer', window.dataLayer); | |
| // apply defaults that persist throughout session: | |
| Object.assign(dataLayer, { | |
| eVar1: '...', | |
| channel: '...', | |
| heir: '...', | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(','); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function meth1(){ | |
| return 1; | |
| } | |
| function meth2(input){ | |
| return 2 + input; | |
| } | |
| function result(arg1, cb){ | |
| var result = typeof(cb) == "function" && cb(arg1) | |
| return result | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 |
NewerOlder