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
import isPlainObject from "lodash/isPlainObject"; | |
import merge from "lodash/merge"; | |
import { | |
createContext, | |
Dispatch, | |
EffectCallback, | |
SetStateAction, | |
useCallback, | |
useContext, | |
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
import { useMemo, forwardRef, Children, memo } from "react"; | |
import { useTranslation } from "react-i18next"; | |
import { | |
View, | |
TextField, | |
Picker as _Picker, | |
Colors, | |
} from "react-native-ui-lib"; | |
import { FontAwesomeIcon } from "@fortawesome/react-native-fontawesome"; | |
import { |
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 script can be bound to a shortcut to show the current throttle policy mode. | |
import subprocess | |
TTP_PATH = '/sys/devices/platform/asus-nb-wmi/throttle_thermal_policy' | |
def send_message(message, icon): | |
print(message) | |
subprocess.Popen(['notify-send', '-a', 'Throttle policy', '-i', icon, '-t', '1000', message]) |
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
const allAncestors = (element, selector, acc = []) => { | |
if (!element.parentElement) return acc; | |
const ancestor = element.parentElement.closest(selector); | |
if (!ancestor) return acc; | |
return allAncestors(ancestor, selector, [ancestor, ...acc]); | |
} |