function useDebounce(state, timeout){
const [current, setState] = useState(state)
useEffect(() => {
const run = setTimeout(() => {
setState(state)
}, timeout)
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
| #ifndef __LOG_H__ | |
| #define __LOG_H__ | |
| #define LOG_LEVEL_FATAL 0 | |
| #define LOG_LEVEL_ERROR 1 | |
| #define LOG_LEVEL_WARN 2 | |
| #define LOG_LEVEL_INFO 3 | |
| #define LOG_LEVEL_DEBUG 4 | |
| #define LOG_LEVEL_VERBOSE 5 |
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
| #ifndef __BOARD_TOFU_H__ | |
| #define __BOARD_TOFU_H__ | |
| #define TOFU_BUTTON1_PIN 33 | |
| #define TOFU_BUTTON2_PIN 25 | |
| #define TOFU_BUTTON3_PIN 32 | |
| #define TOFU_NOTIFICATION_PIN 4 | |
| #define TOFU_STEPUP_PIN 14 |
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
| { | |
| "Create Next Api": { | |
| "prefix": "nextapi", | |
| "body": [ | |
| "import { NextApiRequest, NextApiResponse } from \"next\"", | |
| "export default async (req: NextApiRequest, res: NextApiResponse) => {", | |
| " try {", | |
| " switch (req.method) {", | |
| " default:", | |
| " throw new Error()", |
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
| console.log( | |
| "%cSistem ini dibuat oleh:\n\n %c %c Muhammad Wafa \n", | |
| "font-size: 16px", | |
| "font-size:20px;padding:10px; background:url(https://github.com/mwafa.png) no-repeat;background-size: 40px 40px;", | |
| "font-size: 20px; vertical-align:middle; font-weight:bold", | |
| "\nGithub >> https://github.com/mwafa\n", | |
| "\nLinkedin >>\n\n https://www.linkedin.com/in/muhammad-wafa-587440126/\n\n" | |
| ) |
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
| Server spec: | |
| - RAM: 1024 MB | |
| - CPU: 2 core | |
| - Storage: 30 GB | |
| Software Version: | |
| Docker: version 18.09.7, build 2d0083d | |
| Container: | |
| - MYSQL: 5.7 | |
| - Redis: latest |