Skip to content
View mylo-james's full-sized avatar

Block or report mylo-james

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
mylo-james/README.md

Hey there! 👋

Here's a little bit about me!

import coffee from 'starbucks';
import { moba } from 'online-gaming';

const aboutMe = {
  name: 'Mylo James',
  pronouns: 'He/Him',
  code: ['JavaScript', 'React', 'Redux', 'Express.js'],
  work: {
    job: 'Software Engineering Instructor',
    place: 'App Academy',
    task: 'lecturing',
  },
  favorites: {
    coffee: coffee.psl,
    movie: 'A Wes Anderson movie',
    game: moba.toxic.Dota2,
  },
};

Have you ever wondered what I'd look like as a component?

I'm sure you haven't... but here it is! 🤣

import { drink } from 'native-code';
import { useCallback, useEffect, useState } from 'react';

const Mylo = ({ name, work, favorites, code }) => {
  let [currActivity, setCurrActivity] = useState('sleeping');
  
  const goToWork = useCallback(() => {
    setCurrActivity(`${work.task} about ${code.join(', ')} at ${work.place}`);
  }, [code, work]);

  useEffect(() => {
    (async () => {
      setCurrActivity('drinking coffee');
      const res = await fetch(`https://ordercoffee.com/${favorites.coffee}`);
      const { yum } = res.json();
      drink(yum);
      goToWork();
    })();
    return () => setCurrActivity('sleeping');
  }, [favorites.coffee, goToWork]);

  async function endWork() {
    const res = await fetch('https://check-if-friends-are-online.com');
    if (res.status === 200) {
      setCurrActivity(`playing ${favorites.game}`);
    } else {
      setCurrActivity(`watching ${favorites.movie}`);
    }
  }

  return (
    <>
      <h1>{`${name} is ${currActivity}`}</h1>
      {currActivity.endsWith(work.place) ? (
        <button onClick={endWork}>End Work</button>
      ) : (
        <button onClick={() => setCurrActivity('sleeping')}>Go to Sleep</button>
      )}
    </>
  );
};

export default Mylo;

Pinned Loading

  1. jamesurobertson/Insta jamesurobertson/Insta Public

    Photo sharing app modeled after Instagram

    Python 5

  2. Aderyn1121/vibe Aderyn1121/vibe Public

    JavaScript 14 2

  3. Aura-backend Aura-backend Public

    Python 4

  4. Aura-Native Aura-Native Public

    https://github.com/mylo-james/Aura-backend

    JavaScript 5