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
{ | |
'env': { | |
'browser': true, | |
'es6': true, | |
'node': false, | |
}, | |
'ignorePatterns': ['!.*', 'node_modules/'], | |
'parserOptions': { | |
'ecmaFeatures': { | |
'jsx': true, |
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
javascript:(()=>{let e=0;const o=()=>{let o=Math.random()<=.25?"driver":"spectator",l=document.querySelectorAll(".cameras-column button:first-child"),t=document.querySelectorAll(".cameras-column button:last-child");console.log(e,o),"spectator"===o?l[e]?.click():t[e]?.click(),e++,e>=l.length&&(e=0)};document.querySelector('[overlay="controlPanel.overlays.ingameOverlay"] button:not(.visible)')?.click(),document.querySelector('[overlay="controlPanel.overlays.sessionInfo"] button:not(.visible)')?.click(),document.querySelector('[value="manufacturerLogo"]')?.click(),document.querySelector('[value="gapToLeader"]')?.click(),document.querySelector('[overlay="controlPanel.overlays.standingsTicker"] button:not(.visible)')?.click(),document.querySelector('[ng-model="controlPanel.overlays.driverInfo.settings.showCarData"].ng-empty')?.click(),document.querySelector('[value="driverAndDescription"]')?.click(),document.querySelector('[overlay="controlPanel.overlays.driverInfo"] button:not(.visible)')?.click(),o(),setInterval |
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 fs = require('fs').promises; | |
const convertToGropro = (index, id) => { | |
return `GH${index.padStart(2,'0')}000${id}` | |
} | |
const renameFiles = async (files, filePath, id) => { | |
files.sort(); | |
for (let index = 0; index < files.length; index++) { | |
const file = files[index]; |
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 fs = require('fs').promises; | |
(async () => { | |
console.log(`Reading input from ${__dirname}/${process.argv[2]}.txt`); | |
const inputData = await fs.readFile(`${__dirname}/${process.argv[2]}.txt`); | |
const inputs = inputData | |
.toString() | |
.split('\n') | |
.filter((n) => n); |
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 fs = require('fs').promises; | |
(async () => { | |
console.log(`Reading input from ${__dirname}/${process.argv[2]}.txt`); | |
const inputData = await fs.readFile(`${__dirname}/${process.argv[2]}.txt`); | |
const inputs = inputData | |
.toString() | |
.split('\n') | |
.filter((n) => n); |
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 fs = require('fs').promises; | |
const partOne = (grid) => { | |
let numChanges = 1; | |
while (numChanges > 0) { | |
numChanges = 0; | |
const copyOfGrid = []; | |
for (let row = 0; row < grid.length; row++) { | |
const gridRow = grid[row]; | |
copyOfGrid.push([...gridRow]); |
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 fs = require('fs').promises; | |
(async () => { | |
console.log(`Reading input from ${__dirname}/${process.argv[2]}.txt`); | |
const inputData = await fs.readFile(`${__dirname}/${process.argv[2]}.txt`); | |
const inputs = inputData | |
.toString() | |
.split('\n') | |
.filter((n) => n) | |
.map((n) => parseInt(n, 10)) |
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 fs = require('fs').promises; | |
(async () => { | |
console.log(`Reading input from ${__dirname}/${process.argv[2]}.txt`); | |
const inputData = await fs.readFile(`${__dirname}/${process.argv[2]}.txt`); | |
const inputs = inputData | |
.toString() | |
.split('\n') | |
.filter((n) => n) | |
.map((n) => parseInt(n, 10)); |
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 fs = require('fs').promises; | |
(async () => { | |
console.log(`Reading input from ${__dirname}/${process.argv[2]}.txt`); | |
const inputData = await fs.readFile(`${__dirname}/${process.argv[2]}.txt`); | |
const inputs = inputData | |
.toString() | |
.split('\n') | |
.filter((n) => n); |
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 fs = require('fs').promises; | |
(async () => { | |
console.log(`Reading input from ${__dirname}/${process.argv[2]}.txt`); | |
const inputData = await fs.readFile(`${__dirname}/${process.argv[2]}.txt`); | |
const inputs = inputData | |
.toString() | |
.split('\n') | |
.filter((n) => n); |
NewerOlder