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
| { | |
| "http://agile.coffee/#2f83c1c1-918c-4c78-8671-194b2e9d8e54": { | |
| "StatusCode": 206, | |
| "LastSeen": "2023-06-30T11:47:35.371736-04:00" | |
| }, | |
| "http://agile.coffee/#3716060f-183a-4966-8da4-60daab2842c4": { | |
| "StatusCode": 206, | |
| "LastSeen": "2023-06-30T09:39:08.307606-04:00" | |
| }, | |
| "http://agile.coffee/#b3b37364-d40e-4029-847c-8ee059d60855": { |
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
| // wrap addEventListener calls | |
| wrapEventListener(document) | |
| wrapEventListener(window) | |
| // keep track of | |
| var events = [] | |
| function logEvent(name, context) { | |
| var found = false | |
| events.forEach(function(e) { | |
| if (e.name === name && e.context === context) { |
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
| // show properties | |
| for (var key in obj) { | |
| console.log(key) | |
| var val = obj[key] | |
| if (!val) { | |
| val = '** undefined **' | |
| } else if (typeof val === 'object') { | |
| val = '** function **' | |
| } else if (typeof val === 'function') { | |
| val = '** object **' |
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
| // This example shows using custom instrumentation function. | |
| // The kafka module is instrumented in a central place, separately from the app | |
| // that uses it. | |
| const newrelic = require('newrelic') | |
| const instrumentKafkaClient = require('./kafka-client-instrumentation') | |
| // register instrumentation for the kafka client module | |
| newrelic.instrumentMessages('./mock-kafka-client', instrumentKafkaClient, | |
| function handleError(err) { | |
| // this is called when the instrumentation itself errors |
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
| beforeEach(module(function($provide) { | |
| $provide.factory('$httpBackend', function(){ | |
| return angular.injector(['ng']).get('$httpBackend'); | |
| }) | |
| })); |
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 node = { | |
| next: null, | |
| value: null, | |
| create: function(value, next) { | |
| var inst = Object.create(this); | |
| inst.value = value; | |
| inst.next = next; | |
| return inst; | |
| } | |
| }; |
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 |