Skip to content

Instantly share code, notes, and snippets.

View Friss's full-sized avatar
:shipit:
just ship it

Zachary Friss Friss

:shipit:
just ship it
View GitHub Profile
@Friss
Friss / eslint.js
Last active February 6, 2023 18:46
{
'env': {
'browser': true,
'es6': true,
'node': false,
},
'ignorePatterns': ['!.*', 'node_modules/'],
'parserOptions': {
'ecmaFeatures': {
'jsx': true,
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
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];
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);
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);
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]);
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))
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));
@Friss
Friss / day08.js
Last active December 8, 2020 05:49
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);
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);