sudo lsof -iTCP -sTCP:LISTEN -n -P
sudo kill <mongod_pid>
/* eslint-disable react-hooks/rules-of-hooks */ | |
// 24:33 error React Hook "useNextRouter" is called conditionally. React Hooks must be called in the exact same order in every component render react-hooks/rules-of-hooks | |
// 25:43 error React Hook "useReactRouterNavigate" is called conditionally. React Hooks must be called in the exact same order in every component render react-hooks/rules-of-hooks | |
// 43:35 error React Hook "useNextPathname" is called conditionally. React Hooks must be called in the exact same order in every component render react-hooks/rules-of-hooks | |
// 44:37 error React Hook "useReactRouterLocation" is called conditionally. React Hooks must be called in the exact same order in every component render react-hooks/rules-of-hooks | |
'use client'; | |
import { usePathname as useNextPathname, useRouter as useNextRouter } from 'next/navigation'; | |
import { |
// https://github.com/vitest-dev/vitest/issues/1575#issuecomment-1439286286 | |
export const setup = () => { | |
process.env.TZ = 'UTC'; | |
process.env.NODE_ENV = 'test'; | |
// add process.env mocks | |
}; |
# serverless-api-gateway.yml | |
service: central-api-gateway | |
provider: | |
name: aws | |
runtime: nodejs14.x | |
stage: dev | |
region: sua-região | |
resources: |
/** | |
Given an integer array arr of distinct integers and an integer k. | |
A game will be played between the first two elements of the array (i.e. arr[0] and arr[1]). In each round of the game, we compare arr[0] with arr[1], the larger integer wins and remains at position 0, and the smaller integer moves to the end of the array. The game ends when an integer wins k consecutive rounds. | |
Return the integer which will win the game. | |
It is guaranteed that there will be a winner of the game. | |
Example 1: | |
Input: arr = [2,1,3,5,4,6,7], k = 2 | |
Output: 5 |
const fs = require('fs'); | |
const { PDFDocument, rgb } = require('pdf-lib'); | |
const ExcelJS = require('exceljs'); | |
// Function to convert XLSX to PDF | |
async function convertXlsxToPdf(inputXlsxPath, outputPdfPath) { | |
// Create a new PDF document | |
const pdfDoc = await PDFDocument.create(); | |
// Load the XLSX file | |
const workbook = new ExcelJS.Workbook(); | |
await workbook.xlsx.readFile(inputXlsxPath); |
Concept | Definition |
---|---|
Autonomy | How well will this company give me autonomy to do my job? |
Freedom | How much freedom will I have to balance work and personal life? |
Responsibilities | What level of responsibilities will I have, and how extensive will they be? |
Culture | How well does this company's culture align with my values, and how open is the company to allowing me to contribute to the culture I believe in? |
Tech Stack | How closely does the tech stack used by this company align with my preferences, and to what extent is the company willing to allow me to use the stack I prefer? |
Personal Growth | How big is the potential of this company to help me keep growing? |
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" |
FROM python:3.10 | |
WORKDIR /code | |
#COPY ./requirements.txt /code/requirements.txt | |
COPY ./ /code/ | |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
#COPY ./app /code/app |
import type { NextPage } from 'next'; | |
import { getServerSidePropsPrivate } from '../../../middlewares/getServerSidePropsPrivate'; | |
const MyPrivatePage: NextPage = ({ me }) => { | |
// use me data | |
/* code goes here */ | |
}; | |
export const getServerSideProps = getServerSidePropsPrivate; |