Skip to content

Instantly share code, notes, and snippets.

View MichaelrMentele's full-sized avatar
👨‍💻

Michael Mentele MichaelrMentele

👨‍💻
View GitHub Profile
Don't write code without explicit permission, focus on plans first.
# Development Process Overview
The files will be written to /project. For each of these pretend to be a different "person" so that you do not discuss implementation details at the product or design layer. Go step by step and work on each doc only after I've given the go ahead.
```
/project
/project/workstream.md
/project/design.md
/project/architecture.md
(.trossen) $ rosdep install --from-paths ../interbotix_ros_manipulators/ --ignore-src -r -y
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
interbotix_xsarm_control: Cannot locate rosdep definition for [interbotix_xs_modules]
interbotix_xsarm_puppet: Cannot locate rosdep definition for [roscpp]
interbotix_xsarm_descriptions: Cannot locate rosdep definition for [interbotix_xs_modules]
interbotix_xsarm_dual: Cannot locate rosdep definition for [interbotix_xs_modules]
interbotix_xsarm_moveit: Cannot locate rosdep definition for [interbotix_xs_modules]
interbotix_xsarm_sim: Cannot locate rosdep definition for [gazebo_ros2_control]
# app.ts
import path from 'path'
import { config } from 'dotenv-defaults'
import express from 'express'
import { setup as setupAdminJS } from './adminjs/setup'
import { setup as setupBullBoard } from './bullboard/setup'
import { useMutation } from '@apollo/client'
import lodash from 'lodash'
import {
CreateLienholderInput,
CreateLienholderMutation,
CreateLienholderMutationVariables,
DeleteLienholderMutation,
DeleteLienholderMutationVariables,
FindLienholdersQuery,
Lienholder,
```yaml
e2e-tests:
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
# leaving Cypress Cloud hanging ...
api | "TransactionKey": "4fb3b654c2e14dad8554f0a525143283",
api | "ActionResult": {
api | "ArrayOfMessageDetail": {
api | "MessageDetail": {
api | "Severity": "Error",
api | "Source": "Carleton.Connect.Plugins.CarletonDocs.GetPrintDocumentsConnector",
api | "Code": "GetPrintDocumentsConnector.CC001",
api | "Text": "An unhandled exception was caught: FDD file \\\\amznfsxj1gdmggk.carletoncolo.local\\share\\CarletonConnect\\ClientFiles\\LeftLane\\CarletonDocs\\LEFTLANE_AUTH_LIEN_PAYOFF.fdd does not exist.",
api | "Data": "System.IO.FileNotFoundException: FDD file \\\\amznfsxj1gdmggk.carletoncolo.local\\share\\CarletonConnect\\ClientFiles\\LeftLane\\CarletonDocs\\LEFTLANE_AUTH_LIEN_PAYOFF.fdd does not exist.\n at Carleton.Docs.DocForm.ReadFDD(String name)\n at Carleton.Docs.DocForm..ctor(String name, Int32 defCopies, Int32 minCopies, Int32 maxCopies, Boolean req, String desc, DocSet& ds, String baselineName, Boolean listOnly)\n at Carleton.Docs.DocSet.Re
export const comments: QueryResolvers['comments'] = async ({
parentType,
parentId,
}) => {
const commentable = parentType[0].toLowerCase() + parentType.substring(1)
validateWith(() => {
if (!Object.values(Commentable).includes(commentable)) {
throw new Error(
'Invalid commentable passed in, check your value for parentType'
Summary of all failing tests
FAIL src/pages/PipelinePage/PipelinePage.stories.tsx (9.338 s)
● Pages/PipelinePage › forDeals › smoke-test
TypeError: Cannot read properties of undefined (reading 'toString')
at http:/localhost:7910/main.iframe.bundle.js:108708:29
at Array.map (<anonymous>)
at http:/localhost:7910/main.iframe.bundle.js:108707:53
at Array.forEach (<anonymous>)
@MichaelrMentele
MichaelrMentele / JSIdiomsQuiz.js
Created August 11, 2022 14:59
Quiz for writing more idiomatic JS code
// 1. how would you refactor this function signature? what is problematic about it?
const someFunc = (A, B, C, D = 3, E, F, G = 'default') => { ... }
// 2. see below
myString = "Some string."
b = myString[myString.length - 1] // -> b = myString.slice(-1)
@MichaelrMentele
MichaelrMentele / useEffectQuiz.js
Last active August 11, 2022 14:47
Use effect basics
// 1. when will this useEffect render?
const SomeComponent = () => {
useEffect(() => {
console.log('useEffect')
})
return null
}
// 2. how do you render a use effect once and not on re-renders?