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
/** | |
This code is licensed under the terms of the MIT license | |
*/ | |
import { useEffect, useRef, useState } from 'react'; | |
type UseConsoleOpenOptions = { | |
onOpen?: () => void; | |
pollInterval?: number; | |
}; |
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
Show hidden characters
{ | |
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", | |
"modules": [ | |
"title", | |
"separator", | |
"os", | |
"host", | |
"kernel", | |
"uptime", | |
"packages", |
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
{ | |
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", | |
"modules": [ | |
"title", | |
"separator", | |
"os", | |
"host", | |
"kernel", | |
"uptime", | |
"packages", |
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
file_downloader() { | |
local url="" output="" | |
local downloader="" | |
# Parse arguments | |
while [[ "$#" -gt 0 ]]; do | |
case "$1" in | |
--output=*) | |
output="${1#--output=}" | |
;; |
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
package_installer() { | |
local package_manager="" | |
if command -v apt >/dev/null 2>&1; then | |
package_manager="apt" | |
elif command -v yum >/dev/null 2>&1; then | |
package_manager="yum" | |
elif command -v dnf >/dev/null 2>&1; then | |
package_manager="dnf" | |
elif command -v zypper >/dev/null 2>&1; then |
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
/** | |
This code is licensed under the terms of the MIT license | |
*/ | |
export class ResponseError extends Error { | |
public code!: number; | |
} | |
export const request = async <T>( | |
path: string, |
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
/** | |
This code is licensed under the terms of the MIT license | |
*/ | |
import { useEffect, useRef } from 'react'; | |
export const useInterval = (callback: () => void, delay: number): [() => void] => { | |
const intervalIdRef = useRef<number | null>(null); | |
useEffect(() => { |
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
/** | |
This code is licensed under the terms of the MIT license | |
*/ | |
import { useEffect, useRef } from 'react'; | |
export const useTimeout = (callback: () => void, delay: number): [() => void] => { | |
const timeoutIdRef = useRef<number | null>(null); | |
useEffect(() => { |
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
# This code is licensed under the terms of the MIT license | |
import os | |
import time | |
import random | |
import urequests as requests | |
import upytelegram as telegram | |
from inky_frame import InkyFrame | |
from machine import Pin |
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
/** | |
This code is licensed under the terms of the MIT license | |
*/ | |
/** | |
Usage: | |
const { copyToClipboard } = useClipboard(); | |
copyToClipboard([ | |
{ type: "text/plain", data: "Some String" }, | |
{ type: "text/html", data: "<h1>Some Header</h1>" } |
NewerOlder