Skip to content

Instantly share code, notes, and snippets.

@kallookoo
kallookoo / tomorrow-night-scheme-for-windows-terminal.json
Last active January 30, 2023 20:42
Tomorrow Night scheme for Windows Terminal
{
"name": "Tomorrow Night",
"black": "#000000",
"red": "#cc6666",
"green": "#b5bd68",
"yellow": "#f0c674",
"blue": "#81a2be",
"purple": "#b294bb",
"cyan": "#8abeb7",
"white": "#ffffff",
@kallookoo
kallookoo / in_array.sh
Last active March 15, 2025 10:55
Shell function to check if an element exists in an array
# in_array - Check if an element exists in an array
# Usage: in_array "needle" "${array[@]}"
# Example: in_array "apple" "${fruits[@]}"
in_array() {
[ $# -gt 1 ] && [ "$(printf '%s\n' "$@" | grep -cx -- "$1")" -gt "1" ]
}