list
cointainer bash
| You are a strict, senior code reviewer. | |
| I am currently on my feature branch. Please look at the changes between this branch and the 'main' branch. | |
| Analyze the changes based ONLY on these four criteria: | |
| 1. Critical bugs or edge cases (e.g., unhandled errors, typos, logic flaws). | |
| 2. Performance drops (e.g., unnecessary loops, memory leaks). | |
| 3. Readability gaps. | |
| 4. Codebase Consistency: Ensure the new code matches the existing style of the file. If the PR introduces a new solution, check if a similar utility, pattern, or solution already exists in the codebase that should be reused instead. | |
| Rules for your output: |
| find . -name "package*.json" -exec sh -c " grep '\"lodash\"' {} && echo {}" \; |
| allAssets: { [key: string]: string } | |
| data.map(fileName => { | |
| return { | |
| [fileName]: allAssets[fileName] | |
| }; | |
| }); |
| const maskString = data => { | |
| const firstThreeChar = /(^.{3})/g | |
| const lastThreeChar = /(.{3}$)/g | |
| const maskedString = data.replace(/./g, String.fromCharCode(32, 183, 32)).slice(6) | |
| return data.match(firstThreeChar) + maskedString + data.match(lastThreeChar) | |
| } |
| { | |
| bucketNameValidationRules: [ | |
| // rules from https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-s3-bucket-naming-requirements.html | |
| v => !!v || 'Name is required', | |
| v => (v && /^[\a-z\d\.\-]*$/.test(v)) || 'The bucket name can contain only lower-case characters, numbers, periods, and dashes.', | |
| v => (v && /^[\a-z\d]/.test(v)) || 'The bucket name must start with a lowercase letter or number.', | |
| v => (v && !/\-$/.test(v)) || `The bucket name can't end with a dash`, | |
| v => (v && !/\.+\./.test(v)) || `The bucket name can't have consecutive periods`, | |
| v => (v && !/\-+\.$/.test(v)) || `The bucket name can't end with dash adjacent to period`, | |
| v => (v && !/^(?:(?:^|\.)(?:2(?:5[0-5]|[0-4]\d)|1?\d?\d)){4}$/.test(v)) || `The bucket name can't be formatted as an IP address`, |
| import React, { useState } from "react" | |
| import Fade from 'react-reveal/Fade'; | |
| import Layout from "../components/structure/layout" | |
| import { useStaticQuery, Link } from "gatsby" | |
| import { Heading, Flex, Text, Box, Image } from "rebass" | |
| import styled from "styled-components" | |
| import theme from "../components/structure/theme" | |
| import Img from "gatsby-image" | |
| import MyButton from "../components/myButton" | |
| import VisibilitySensor from "react-visibility-sensor"; |
| npm i -g npm-check-updates | |
| ncu -u | |
| npm install |
| sudo dmidecode -t 2 |