This file contains 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
####################### | |
# YAML parser for BASH! | |
####################### | |
parse_yml() { | |
local prefix=$2 | |
local s | |
local w | |
local fs | |
s='[[:space:]]*' |
This file contains 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
#!/bin/bash | |
trap 'tput cnorm; echo' EXIT | |
tput civis | |
end=$(($(date +%s) + 15)) | |
spin='⢿⣿⣻⣿⣽⣿⣾⣿⣷⣿⣿⣾⣿⣷⣿⣯⣿⣟⣿⡿⣿⢿⡿⣿' | |
i=0 sp="" len=24 cnt=0 | |
gr=$(tput setaf 2) | |
nc=$(tput sgr0) | |
while [ $(date +%s) -lt $end ]; do |
This file contains 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
#!/bin/sh | |
# info.sh | |
# Output information with formatted background colors in lemonbar format | |
# This script can take arguments for what bar information to display(meant to be the names of the functions) | |
# clickable area aliases | |
AC='%{A:' # start click area | |
AB=':}' # end click area cmd | |
AE='%{A}' # end click area | |
# %{R} # swap current bg/fg |
This file contains 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
OPENAI_API_KEY=beans2000 | |
GH_TOKEN=beans2001 |
This file contains 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
#!/usr/bin/env bash | |
source <(curl -sL bashmenu.sh) | |
echo "Which protocol would you like to use?" | |
proto_opts=$(echo -e "https\nssh") | |
readarray -t protocols < <(echo "$proto_opts") | |
singleselect "false" result protocols -1 | |
protocol="$result" | |
echo "You have selected: $protocol" |
This file contains 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
#!/bin/bash | |
# Initialize options | |
follow_redirects=false | |
show_headers_only=false | |
silence_output=false | |
# Process options | |
while getopts "LsI" opt; do | |
case $opt in |
This file contains 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
#!/usr/bin/env bash | |
function cavemanget() { | |
local URL=$1 | |
if [ "$URL" = "" ]; then | |
echo "A caveman version of wget" | |
echo "Usage: $0 \"URL\"" | |
return 1 | |
fi |
This file contains 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 argparse | |
import subprocess | |
import json | |
import re | |
# You need to have the `twitch-cli` installed and configured | |
# Define ANSI color codes | |
colors = { |
This file contains 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
#!/usr/bin/env bash | |
set -euo pipefail | |
download_dir="." | |
TMPOUT=$(mktemp /tmp/tmpXXXXXXXXXX) | |
Coff='\e[0m' # Off | |
Green='\e[0;32m' # Green | |
Blue='\e[0;34m' # Blue | |
Yellow='\e[0;33m' # Yellow |
NewerOlder