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
| #cloud-config | |
| #=============================================================================== | |
| # Cloud-Init Configuration - Ubuntu 22.04+ | |
| # Includes: User Setup, SSH Hardening, 5GB Swap, Docker LTS | |
| # | |
| # Usage: Upload to VPS provider as "User Data" or "Cloud-Init Script" | |
| #=============================================================================== | |
| #------------------------------------------------------------------------------- | |
| # 1. SYSTEM CONFIGURATION |
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
| //useCounter.tsx | |
| import { useState } from 'react'; | |
| function useCounter(initialValue = 0) { | |
| const [count, setCount] = useState(initialValue); | |
| const increment = () => setCount((prevCount) => prevCount + 1); | |
| const decrement = () => setCount((prevCount) => prevCount - 1); | |
| const reset = () => setCount(initialValue); |
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
| {"lastUpload":"2020-12-10T13:33:33.801Z","extensionVersion":"v3.4.3"} |