Format is described here: https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.DiagnosticSource/src/ActivityUserGuide.md#id-format
This file contains 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
// the base command class or interface | |
class Command { | |
handle() { | |
} | |
} | |
class CreateUserCommand extends Command { | |
constructor(user) { | |
super(); | |
this.user = user; |
This file contains 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 ASTNode(token, leftChildNode, rightChildNode) { | |
this.token = token.value; | |
this.leftChildNode = leftChildNode; | |
this.rightChildNode = rightChildNode; | |
} | |
function parse(inp){ | |
var outStack=[]; | |
var opStack=[]; |
This file contains 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 throttle(f, t) { | |
return function (args) { | |
let previousCall = this.lastCall; | |
this.lastCall = Date.now(); | |
if (previousCall === undefined // function is being called for the first time | |
|| (this.lastCall - previousCall) > t) { // throttle time has elapsed | |
f(args); | |
} | |
} | |
} |
This file contains 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
2020-02-05 11:20:19.512 [apm-server-healthcheck] DEBUG co.elastic.apm.agent.report.ApmServerHealthChecker - Starting healthcheck to http://172.24.102.69:8200/ | |
2020-02-05 11:20:19.522 [main] DEBUG co.elastic.apm.agent.impl.payload.SystemInfo - Could not parse container ID from '/proc/self/cgroup' line: 10:net_cls:/ | |
2020-02-05 11:20:19.522 [main] DEBUG co.elastic.apm.agent.impl.payload.SystemInfo - Could not parse container ID from '/proc/self/cgroup' line: 9:memory:/ | |
2020-02-05 11:20:19.523 [main] DEBUG co.elastic.apm.agent.impl.payload.SystemInfo - Could not parse container ID from '/proc/self/cgroup' line: 8:hugetlb:/ | |
2020-02-05 11:20:19.523 [main] DEBUG co.elastic.apm.agent.impl.payload.SystemInfo - Could not parse container ID from '/proc/self/cgroup' line: 7:perf_event:/ | |
2020-02-05 11:20:19.523 [main] DEBUG co.elastic.apm.agent.impl.payload.SystemInfo - Could not parse container ID from '/proc/self/cgroup' line: 6:devices:/ | |
2020-02-05 11:20:19.524 [main] DEBUG co.elastic.apm.agent.impl.payload.SystemInfo |
This file contains 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
2020-02-05 14:08:14.431 [apm-server-healthcheck] DEBUG co.elastic.apm.agent.report.ApmServerHealthChecker - Starting healthcheck to http://172.24.102.69:8200/ | |
2020-02-05 14:08:14.442 [main] DEBUG co.elastic.apm.agent.impl.payload.SystemInfo - Could not parse container ID from '/proc/self/cgroup' line: 10:memory:/ | |
2020-02-05 14:08:14.442 [main] DEBUG co.elastic.apm.agent.impl.payload.SystemInfo - Could not parse container ID from '/proc/self/cgroup' line: 9:hugetlb:/ | |
2020-02-05 14:08:14.442 [main] DEBUG co.elastic.apm.agent.impl.payload.SystemInfo - Could not parse container ID from '/proc/self/cgroup' line: 8:devices:/ | |
2020-02-05 14:08:14.443 [main] DEBUG co.elastic.apm.agent.impl.payload.SystemInfo - Could not parse container ID from '/proc/self/cgroup' line: 7:blkio:/ | |
2020-02-05 14:08:14.443 [main] DEBUG co.elastic.apm.agent.impl.payload.SystemInfo - Could not parse container ID from '/proc/self/cgroup' line: 6:cpuacct,cpu:/ | |
2020-02-05 14:08:14.443 [main] DEBUG co.elastic.apm.agent.impl.payload.SystemInfo - |
This file contains 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
const TOKEN_PATH = 'token.json'; | |
const SCOPES = ['https://www.googleapis.com/auth/spreadsheets']; | |
const gapi = require('googleapis'); | |
const clientSecret = process.env.GOOGLE_CLIENT_SECRET; | |
const clientId = process.env.GOOGLE_CLIENT_ID; | |
const redirectUri = process.env.GOOGLE_REDIRECT_URI; | |
const oAuth2Client = new gapi.google.auth.OAuth2(clientId, clientSecret, redirectUri); | |
const fs = require('fs').promises; | |
This file contains 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
/** | |
* Simple promise implementation. Doesn't have all the features of the actual Promise API, + assumes you know what you're doing. | |
*/ | |
class ToyPromise { | |
constructor(cb) { | |
this.state = 'pending'; | |
this._promiseResult = undefined; | |
this._fulfillmentCallbacks = []; | |
this._rejectionCallbacks = []; |
This file contains 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
const wordList = { | |
sacrilege: {popularity: 0.5207411547}, | |
sarcasm: {popularity: 0.1913595276}, | |
said: {popularity: 0.736293578}, | |
sardine: {popularity: 0.2439570583}, | |
sars: {popularity: 0.6371759558}, | |
saw: {popularity: 0.1695272778}, | |
say: {popularity: 0.8312312658}, | |
scare: {popularity: 0.3623531581}, |
This file contains 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 Jimp = require('jimp'); | |
const fileName = process.argv[2]; | |
const width = process.argv[3]; | |
const height = process.argv[4]; | |
Jimp.read(fileName) | |
.then(photo => { | |
let colours = {}; | |
for (let x = 0; x < width; x++) { |