Skip to content

Instantly share code, notes, and snippets.

View DevanB's full-sized avatar
👨‍💻
Cooking Up Some Code

Devan DevanB

👨‍💻
Cooking Up Some Code
View GitHub Profile
@DevanB
DevanB / ForgotPasswordPage.tsx
Last active April 17, 2024 13:02
Zod + RW Form issues
import { useEffect } from 'react'
import { zodResolver } from '@hookform/resolvers/zod'
import { z } from 'zod'
import {
EmailField,
FieldError,
Form,
Label,
{
"devDependencies": {
"@applitools/eyes-api": "1.13.12",
"@applitools/eyes-cypress": "3.36.1",
"@applitools/types": "1.5.19",
"@badeball/cypress-cucumber-preprocessor": "17.2.1",
"@bahmutov/cypress-esbuild-preprocessor": "2.2.0",
"@cypress/browserify-preprocessor": "3.0.2",
"@esbuild-plugins/node-modules-polyfill": "0.2.2",
"@graphql-codegen/cli": "4.0.1",
@DevanB
DevanB / Description.md
Created January 21, 2021 20:10 — forked from TejasQ/Description.md
⬢ G2i NodeJS Test

⬢ G2i NodeJS Test

Messaging acronyms are everywhere now. Do you know all of them?

Build a REST API for the World Texting Foundation, also known as WTF.

A sample JSON data file will be provided with a base set of acronym definitions. We expect you to create a NodeJS server using modern best practices for API development. Please consider the recommendations attached as this will list the items we are looking for above.

@DevanB
DevanB / machine.js
Created March 12, 2020 12:55
Generated by XState Viz: https://xstate.js.org/viz
const testMachine = Machine(
{
id: 'Machine',
initial: 'welcome',
context: {
currentQuestion: 0,
currentQuestionDisplay: 1,
questions: [],
totalCorrectAnswers: 0,
},
@DevanB
DevanB / 2.md
Last active November 18, 2019 16:14
React Training Orlando Notes

useState

A component has a stack, and adds hooks based like:

const Component = () => {
  const [value, setValue] = React.useState(5)
}
@DevanB
DevanB / machine.js
Created October 9, 2019 02:31
Generated by XState Viz: https://xstate.js.org/viz
const fetchQuizData = () =>
fetch(
`https://opentdb.com/api.php?amount=10&difficulty=hard&type=boolean`,
).then(response => response.json())
const normalizeQuizData = (data) =>
data.reduce(
(acc, obj) => [
...acc,
{
@DevanB
DevanB / machine.js
Last active August 31, 2019 12:50
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@DevanB
DevanB / machine.js
Last active August 23, 2019 20:06
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@DevanB
DevanB / issues.md
Last active July 24, 2019 16:47
Lambda School iOS Pre-course Work Issues
  • While I understand that we all struggle and have to be perpetual learners as developers, I think there is a requirement to have some foundational knowledge. I’m assuming this precourse work is normalizing each incoming student’s knowledge to succeed. I think the points below highlight that no assumptions can be made about prior knowledge, and no level of Google’ing can help a new developer (if they are even that at this point) even begin to figure out where to start.

  • Optionals: I think the instruction could be better for unwrapping. I know this is a poor first feedback point, but it is the truth. See how @twostraws at hackingwithswift.com handles it, or consider using his Swift fundamentals content in place of the Lambda videos.

  • iOS Pre-Course Challenge Section: Week 1 repl.it doesn't explain that you have to test both scenarios to pass. In these types of challenges, an input is typically given that is out of control of the user, the user’s code is executed against the input, and the answer is checked

@DevanB
DevanB / config.js
Created May 30, 2019 14:10
Gatsby + Contentful Images
{
resolve: 'gatsby-plugin-sharp',
options: {
useMozJpeg: true,
defaultQuality: 100,
fixed: {
quality: 100,
},
fluid: {
quality: 100,