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 { KeyboardEvent, useState } from 'react'; | |
interface MoneyInputReturn { | |
cents: number; | |
setCents: (newCents: number) => void; | |
stringValue: string; | |
handleKeyUp: (event: KeyboardEvent<HTMLInputElement>) => 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
function printCube(height) { | |
const width = height * 2; | |
const depth = Math.ceil(height / 2); | |
const canvas = []; | |
const canvasWidth = width + 2 + depth + 1; | |
const canvasHeight = height + 2 + depth + 1; | |
for (let i = 0; i < canvasHeight; i++) { | |
canvas[i] = Array(canvasWidth).fill(" "); |
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
const { exec } = require("child_process"); | |
let macAddress; | |
do { | |
macAddress = "XX:XX:XX:XX:XX:XX".replace(/X/g, () => | |
"0123456789abcdef".charAt(Math.floor(Math.random() * 16)) | |
); | |
} while (parseInt(macAddress[1], 16) % 2 !== 0); |