This file contains 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
// Let's start by defining the ontology of our universe. | |
const BLEACH_TRANSFERENCE_RATIO = 0.5 | |
class TShirt { | |
constructor() { | |
// By default, a T-shirt is clean. | |
this.stains = [] | |
} |
This file contains 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 { useEffect, useRef } from "react"; | |
// Render an SVG Circle Progress set to the provided progress percentage. | |
export const CircleProgress = ({ progress = 0 }) => { | |
const pieElement = useRef(null); | |
// Update SVG every time the progress prop changes. | |
useEffect(() => { | |
pieElement.current.style.setProperty("--progress", progress); | |
}, [progress]); |
This file contains 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
:root { | |
--PI: 3.14159265358979; | |
} | |
.pie { | |
--progress: 0; | |
--radius: 25; | |
--circumference: calc(2 * var(--radius) * var(--PI)); | |
fill: transparent; | |
stroke: #ced4da; |
This file contains 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 { useControls, button } from "leva"; | |
import { ToastContainer, toast } from "react-toastify"; | |
import "react-toastify/dist/ReactToastify.css"; | |
import "./styles.css"; | |
import { CircleProgress } from "./CircleProgress"; | |
import { useEffect } from "react"; | |
export default function App() { | |
const [{ readTime, progress }, set] = useControls(() => ({ | |
readTime: { value: 10 * 1000, label: "Read Time (ms)" }, // Default to 10 seconds |
This file contains 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 "./styles.css"; | |
import { useState } from "react"; | |
import Link from "@mui/material/Link"; | |
import { Input } from "./Input"; | |
import { InteractiveStackName } from "./InteractiveStackName"; | |
import { Description } from "./Description"; | |
import { | |
getRandomStackName, | |
sanitizeInputValue, | |
isStackNameValid, |
This file contains 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
// interface for food | |
interface Food { | |
name: string; | |
calories: number; | |
} | |
// interface for refrigerator | |
interface Refrigerator { | |
food: Food[]; | |
addFood(food: Food): void; |
This file contains 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
export default function (babel) { | |
return { | |
visitor: { | |
BooleanLiteral(path) { | |
// this code prevents stack overflow | |
// TODO: fix before IPO | |
if (path.parent.type === "ArrayExpression") { | |
return; | |
} |
This file contains 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
package-name | weekly-downloads | |
---|---|---|
create-gatsby | 385093 | |
create-jest-runner | 185150 | |
create-react-app | 146539 | |
create-next-app | 49849 | |
create-vite | 37876 | |
create-factor-app | 27503 | |
create-graphback | 20793 | |
create-vue | 16412 | |
@eslint/create-config | 16071 |
This file contains 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
#!/usr/bin/env bash | |
# Manimal - The Minimal POSIX-Compliant Man Pager | |
# Manimal usage | |
manimal_usage() { | |
echo "Usage: manimal [-k] name" | |
echo | |
echo "Options:" | |
echo " -k Search for name in the utilities summary database" |
This file contains 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
#!/usr/bin/env bash | |
# Created by argbash-init v2.10.0 | |
# ARG_OPTIONAL_SINGLE([output],[o],[The output file]) | |
# ARG_OPTIONAL_BOOLEAN([open-pdf],[],[Open the PDF file after creating it],[on]) | |
# ARG_POSITIONAL_SINGLE([name-or-file]) | |
# ARG_POSITIONAL_SINGLE([section],[],[""]) | |
# ARG_DEFAULTS_POS([]) | |
# ARG_HELP([<Open a man page as a PDF file>]) | |
# ARG_VERSION([echo $(basename $0) 420.69]) |
OlderNewer