I hereby claim:
- I am meteormanaged on github.
- I am mikekozak (https://keybase.io/mikekozak) on keybase.
- I have a public key ASC-OHwFXNNydwnJMoTeCT-cmJuRsAqTmdi4exD-44lxcwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// Function to "update" state by pushing or replacing depending on current state. | |
function updateState(queryParams) { | |
//Build other options. | |
var title = document.title; | |
var newUrl = window.location.protocol + '//' + window.location.host + window.location.pathname + '?' + queryParams; | |
// Do we already have a query state that we've pushed? Let's look at window.location.search to find out. | |
if (window.location.search.length > 1) { | |
// If so, let's replace it. | |
window.history.replaceState({}, title, newUrl); | |
} else { |
// partial code | |
// You can tighten this up | |
return { | |
setPosition: setPosition, | |
getPosition: getPosition, | |
incrPosition: incrPosition, | |
decrPosition: decrPosition, | |
resetPosition: resetPosition, | |
addMarker: addMarker, | |
nextLocationShow: nextLocationShow, |
//Docker CMD ran at launch is CMD [ "ember", "fastboot", "--serve-assets", "--environment=production", "--port=8080" ] | |
//First time this runs, it fails. If the container is restarted (so as to already have ran through building once), it starts as expected. | |
7/22/2016 11:50:14 AM[2K[1G[?25hCould not start watchman; falling back to NodeWatcher for file system events. | |
7/22/2016 11:50:14 AM[2K[1G[?25hVisit http://ember-cli.com/user-guide/#watchman for more info. | |
7/22/2016 11:51:18 AM[?25l[2K[1G[32m⠋[39m [32mBuilding[39m[2K[1G[32m⠙[39m [32mBuilding[39m[2K[1G[32m⠹[39m [32mBuilding[39m[2K[1G[32m⠸[39m [32mBuilding[39m[2K[1G[32m⠼[39m [32mBuilding[39m[2K[1G[32m⠴[39m [32mBuilding[39m[2K[1G[32m⠦[39m [32mBuilding[39m[2K[1G[32m⠧[39m [32mBuilding[39m[2K[1G[32m⠇[39m [32mBuilding[39m[2K[1G[32m⠏[39m [32mBuilding[39m[2K[1G[32m⠋[39m [32mBuilding[39m[2K[1G[32m⠙[39m [32mBuilding[39m[2K[1G[32m⠹[39m [32mBuilding[39m[2K[1G[32m⠸[39m [32mBuilding |
const filterClasses = (ev) => { | |
// Filter those classes for a class containing with 'gtm-' | |
const filteredClasses = ev.toElement.className.split(' ').filter((thisClass) => thisClass.indexOf('gtm-' !== -1) ? thisClass : false); | |
//If it was a match, return the matching classname as a string, otherwise, return false. | |
if (filteredClasses.length > 0) return filteredClasses[0]; | |
else return false; | |
}; | |
const gaSend = (className) => | |
ga('send', { |
var filterClasses = function(ev) { | |
'use strict'; | |
// Get the classNames associated with the clicked elements and split them into an array at whitespace. | |
var classes = ev.toElement.className.split(' '); | |
// Filter those classes for a class containing with 'gtm-' | |
var filteredClasses = classes.filter(function(thisClass) { | |
if (thisClass.indexOf('gtm-') !== -1) return thisClass; | |
else return false; | |
}); | |
//If it was a match, return the matching classname as a string, otherwise, return false. |
g6Rib2R5hqhkZXRhY2hlZMOpaGFzaF90eXBlCqNrZXnEIwEgvjh8BVzTcncJyTKE3gk/nJibkbAKk5nYuHsQ/uOJcXMKp3BheWxvYWTFAvF7ImJvZHkiOnsia2V5Ijp7ImVsZGVzdF9raWQiOiIwMTAxM2E1NTczYWM2NzE4YTI1ZTkyM2VjMmQxYjhmYzVkNTMyZTliYzVjNDQ1NTgxMTcwYTNjOWMyODk4NGM1ZGY3ODBhIiwiaG9zdCI6ImtleWJhc2UuaW8iLCJraWQiOiIwMTIwYmUzODdjMDU1Y2QzNzI3NzA5YzkzMjg0ZGUwOTNmOWM5ODliOTFiMDBhOTM5OWQ4Yjg3YjEwZmVlMzg5NzE3MzBhIiwidWlkIjoiNzBhMjA3NTJkZmZhOTVjMjEyODY2ZTU3NGI5NDJhMTkiLCJ1c2VybmFtZSI6Im1pa2Vrb3phayJ9LCJzZXJ2aWNlIjp7Im5hbWUiOiJnaXRodWIiLCJ1c2VybmFtZSI6Im1ldGVvcm1hbmFnZWQifSwidHlwZSI6IndlYl9zZXJ2aWNlX2JpbmRpbmciLCJ2ZXJzaW9uIjoxfSwiY2xpZW50Ijp7Im5hbWUiOiJrZXliYXNlLmlvIGdvIGNsaWVudCIsInZlcnN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