- Tests Pass - Code must work correctly
- Reveals Intention - Self-documenting, readable code with clear names
- No Business Logic Duplication - Eliminate redundant business logic (code repetition OK for clarity)
- Fewest Elements - Keep solutions simple
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const BEFORE_LUNCH_TIME_RANGE = ["07:00", "14:00"] | |
| const AFTER_LUNCH_TIME_RANGE = ["14:30", "16:00"] | |
| const FRIDAY_TIME_RANGE = ["08:00", "14:30"] | |
| const DEBUG = true | |
| const wait = (time = 1000) => { | |
| return new Promise((resolve) => { | |
| setTimeout(() => { | |
| resolve(true); | |
| }, time); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { createRemixStub } from "@remix-run/testing"; | |
| import { render, screen } from "@testing-library/react"; | |
| import { userEvent } from "@testing-library/user-event"; | |
| import { useState } from "react"; | |
| function App() { | |
| const [counter, setCounter] = useState(0); | |
| return ( | |
| <div style={{ fontFamily: "system-ui, sans-serif", lineHeight: "1.8" }}> |
This gives you that beautiful green lock in Chrome. I'm assuming you're putting your SSL documents in /etc/ssl, but you can put them anywhere and replace the references in the following commands. Tested successfully on Mac OS Sierra and High Sierra.
sudo nano /etc/ssl/localhost/localhost.conf
Content:
[req]