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
| # Summary: Mugen87's review preferences | |
| Grouped by theme, most frequent first. Each rule cites the PRs where it came up. | |
| ## 1. Don't add defensive validation or throws | |
| This is his most repeated request. |
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
| /** | |
| * ESLint rule to prevent the use of Prisma's `include` queries | |
| * This rule helps prevent accidental exposure of sensitive data by encouraging | |
| * explicit field selection using `select` instead of `include` | |
| */ | |
| export default { | |
| meta: { | |
| type: 'problem', | |
| docs: { |
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
| const fileUrl = new URL(`/api/files/${fileId}/content`, API_URL); | |
| const url = new URL('/api/images', API_URL); | |
| url.pathname += `/webp`; | |
| url.pathname += `/${params.width ?? 0}`; | |
| url.pathname += 'x'; | |
| url.pathname += `${params.height ?? 0}`; | |
| url.pathname += `/filters:format(${params.extension ?? 'png'})`; | |
| url.pathname += `/${fileUrl}`; |
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
| import axios from 'axios'; | |
| import fs from 'fs'; | |
| import path from 'path'; | |
| async function downloadImageAsAxiosStream(url: string, filename: string) { | |
| // Fetch the image | |
| const response = await axios({ | |
| url, | |
| method: 'GET', | |
| responseType: 'stream' |
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
| __d( | |
| 'useThrottledImpl', | |
| ['cr:1708227'], | |
| function (a, b, c, d, e, f, g) { | |
| 'use strict'; | |
| g['default'] = b('cr:1708227'); | |
| }, | |
| 98 | |
| ); | |
| __d( |
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
| FROM node:16-alpine | |
| WORKDIR /usr/src/app | |
| # install dependencies | |
| COPY package*.json ./ | |
| COPY packages/shared/package*.json ./packages/shared/ | |
| COPY packages/collector/package*.json ./packages/collector/ | |
| COPY packages/frontend/package*.json ./packages/frontend/ | |
| RUN npm ci |
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
| THREE.TRAAPass = function(scene, camera, resolution) { | |
| THREE.Pass.call(this); | |
| this.scene = scene; | |
| this.camera = camera; | |
| // old velcotiy material. | |
| function getSuperSampleTRAAMaterial() { | |
| return new THREE.ShaderMaterial({ | |
| defines: { |
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
| import { FileLoader } from './FileLoader'; | |
| import { DataTexture } from '../textures/DataTexture'; | |
| import { DefaultLoadingManager } from './LoadingManager'; | |
| import { _Math } from '../math/Math'; | |
| function IESLoader(manager) { | |
| this.manager = (manager !== undefined) ? manager : DefaultLoadingManager; | |
| } |
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
| <input type="text" id="modelUrl" style="width:100%" value="http://exocortex.github.io/glb-crash/icosphere.glb"> | |
| <br> | |
| <a id="link"></a> | |
| <script> | |
| function setUrl(url) { | |
| link.innerHTML = url; | |
| link.href = `intent://arvr.google.com/scene-viewer/1.0?enable_vertical_placement=true&file=${escape(url)}&mode=ar_only&resizable=false&title=AR#Intent;scheme=https;package=com.google.ar.core;action=android.intent.action.VIEW;end` | |
| } |
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
| import { Spend } from '../plan/model.mjs'; | |
| import nodemon from 'nodemon'; | |
| import { log, logPush, logPop } from '../logging.mjs'; | |
| var spendBodyRegex = /(?<operation>(added|subtracted)) (?<duration>([0-9]+[mowdhs]+ )*)(of time spent at )(?<date>[0-9\-]+)/; | |
| var spendResetBody = "removed time spent"; | |
| //var durationRegex = new RegExp( '^((?<months>[0-9]+)mo(\\w)*)?((?<weeks>[0-9]+)w(\\w)*)?((?<days>[0-9]+)d(\\w)*)?((?<hours>[0-9]+)h(\\w)*)?((?<minutes>[0-9]+)m(\\w)*)?((?<seconds>[0-9]+)s(\\w)*)?' ); |
NewerOlder