Many changes
This commit is contained in:
13
dot-services/sunshine-tweaks.service
Normal file
13
dot-services/sunshine-tweaks.service
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Script Daemon For Sunshine Tweaks
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
#User=
|
||||||
|
#Group=
|
||||||
|
ExecStart=/usr/local/bin/sunshine-tweaks.sh
|
||||||
|
Restart=on-failure
|
||||||
|
StandardOutput=file:%h/sunshine_tweaks.log
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
3
scripts/shell/adjust-urls-txt-files.sh
Executable file
3
scripts/shell/adjust-urls-txt-files.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
fd -g "urls.txt" -X sed -i 's/vxtwitter\|fxtwitter\|twitter\|fixupx/x/g'
|
||||||
5
scripts/shell/dot-desktop-search.sh
Normal file
5
scripts/shell/dot-desktop-search.sh
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
DESKTOP_PATHS=(
|
||||||
|
/usr/share/applications/
|
||||||
|
/usr/local/share/applications/
|
||||||
|
~/.local/share/applications/
|
||||||
|
)
|
||||||
67
scripts/shell/ffmpeg-join-videos.sh
Executable file
67
scripts/shell/ffmpeg-join-videos.sh
Executable file
@@ -0,0 +1,67 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Usage example:
|
||||||
|
# ./ffmpeg-join-videos.sh -i vid1.mp4 vid2.mp4 vid3.mp4 -o output_name
|
||||||
|
|
||||||
|
# Exit on error
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Parse arguments
|
||||||
|
videos=()
|
||||||
|
output_filename=""
|
||||||
|
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case "$1" in
|
||||||
|
-i | --input-list)
|
||||||
|
shift
|
||||||
|
# Collect all filenames until another option appears or args end
|
||||||
|
while [[ $# -gt 0 && "$1" != -* ]]; do
|
||||||
|
videos+=("$1")
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
-o | --output-filename)
|
||||||
|
output_filename="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
-h | --help)
|
||||||
|
echo "Usage: $0 -i file1 file2 [file3 ...] -o output_name"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown option: $1"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Validate args
|
||||||
|
if [[ ${#videos[@]} -lt 2 ]]; then
|
||||||
|
echo "Error: You must provide at least two input files with -i"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$output_filename" ]]; then
|
||||||
|
echo "Error: You must provide an output filename with -o"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Number of videos
|
||||||
|
n=${#videos[@]}
|
||||||
|
|
||||||
|
# Build input args for ffmpeg
|
||||||
|
inputs=()
|
||||||
|
for vid in "${videos[@]}"; do
|
||||||
|
inputs+=("-i" "$vid")
|
||||||
|
done
|
||||||
|
|
||||||
|
# Build the concat filter
|
||||||
|
filter=""
|
||||||
|
for i in "${!videos[@]}"; do
|
||||||
|
filter+="[$i:v] [$i:a] "
|
||||||
|
done
|
||||||
|
|
||||||
|
filter_complex="${filter}concat=n=$n:v=1:a=1 [v] [a]"
|
||||||
|
|
||||||
|
# Run ffmpeg
|
||||||
|
ffmpeg "${inputs[@]}" -filter_complex "$filter_complex" -map "[v]" -map "[a]" "${output_filename}.mp4"
|
||||||
3
scripts/shell/find-big-files.sh
Executable file
3
scripts/shell/find-big-files.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
fd . --size +10M --exec-batch exa --long --all --sort size --color=always --icons=always --ignore-glob desktop.ini | less --raw-control-chars
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
show_help() {
|
show_help() {
|
||||||
# echo "Usage: `basename $0` [--no-abort-on-found] [--parallel] [--custom-grep-search|-c <string>]"
|
# echo "Usage: `basename $0` [--no-abort-on-found] [--parallel] [--custom-grep-search|-c <string>]"
|
||||||
echo "Usage: $(basename $0) [--help|-h] [--filter-mode|-f]"
|
echo "Usage: $(basename "${0}") [--help|-h] [--filter-mode|-f]"
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " --help | -h (optional) Display script's help text"
|
echo " --help | -h (optional) Display script's help text"
|
||||||
echo " --filter-mode | -f (optional) The script iterate over the files of a selected folder and store the ones that should be deleted"
|
echo " --filter-mode | -f (optional) The script iterate over the files of a selected folder and store the ones that should be deleted"
|
||||||
@@ -12,7 +12,6 @@ show_help() {
|
|||||||
|
|
||||||
filter_mode=false
|
filter_mode=false
|
||||||
urls_list_arg=""
|
urls_list_arg=""
|
||||||
interactive_mode=false
|
|
||||||
|
|
||||||
while [ "$#" -gt 0 ]; do
|
while [ "$#" -gt 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@@ -28,10 +27,6 @@ while [ "$#" -gt 0 ]; do
|
|||||||
urls_list_arg="$2"
|
urls_list_arg="$2"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-i)
|
|
||||||
interactive_mode=true
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
*) shift ;;
|
*) shift ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -39,7 +34,7 @@ done
|
|||||||
commands_to_check=(gallery-dl gdl.sh feh xdotool)
|
commands_to_check=(gallery-dl gdl.sh feh xdotool)
|
||||||
|
|
||||||
commands_not_found=()
|
commands_not_found=()
|
||||||
for command in ${commands_to_check[@]}; do
|
for command in "${commands_to_check[@]}"; do
|
||||||
if ! command -v "$command" &>/dev/null; then
|
if ! command -v "$command" &>/dev/null; then
|
||||||
commands_not_found+=("$command")
|
commands_not_found+=("$command")
|
||||||
fi
|
fi
|
||||||
@@ -48,16 +43,15 @@ done
|
|||||||
if [ ${#commands_not_found[@]} -ne 0 ]; then
|
if [ ${#commands_not_found[@]} -ne 0 ]; then
|
||||||
echo 'The following commands are necessary in order to run the script, but were not found:'
|
echo 'The following commands are necessary in order to run the script, but were not found:'
|
||||||
|
|
||||||
for command in ${commands_not_found[@]}; do
|
for command in "${commands_not_found[@]}"; do
|
||||||
echo " \"$command\""
|
echo " \"$command\""
|
||||||
done
|
done
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
furry_commission_ideas_path=/mnt/e/clouds/nextcloud-velha-casa/data-hoarding/furry-downloads
|
furry_commission_ideas_path='/media/hd/clouds/nextcloud-strawberry/data-hoarding/furry-downloads'
|
||||||
# furry_commission_ideas_path=/mnt/e/home/documents-unsorted/data-hoarding/furry-downloads
|
# furry_commission_ideas_path='/mnt/e/clouds/nextcloud-strawberry/data-hoarding/furry-downloads'
|
||||||
# furry_commission_ideas_path=/mnt/e/home/downloads/furry-downloads
|
|
||||||
furry_commission_ideas_urls_filename="urls.txt"
|
furry_commission_ideas_urls_filename="urls.txt"
|
||||||
scripts_path=/home/cloud/git/personal-devboot/scripts/shell
|
scripts_path=/home/cloud/git/personal-devboot/scripts/shell
|
||||||
|
|
||||||
@@ -234,7 +228,7 @@ fill_existing_folders_array() {
|
|||||||
ignore_paths_depth_2=("artists")
|
ignore_paths_depth_2=("artists")
|
||||||
ignore_paths_depth_last=("no-source" ".bsky.social" "old" "mine")
|
ignore_paths_depth_last=("no-source" ".bsky.social" "old" "mine")
|
||||||
|
|
||||||
find_command="find * -type d"
|
find_command="find * -maxdepth 1 -type d"
|
||||||
|
|
||||||
for path in "${ignore_paths[@]}"; do
|
for path in "${ignore_paths[@]}"; do
|
||||||
find_command+=" -not -path $path"
|
find_command+=" -not -path $path"
|
||||||
|
|||||||
43
scripts/shell/modrinth-get-versions.sh
Executable file
43
scripts/shell/modrinth-get-versions.sh
Executable file
@@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
project_ids=(
|
||||||
|
51shyZVL
|
||||||
|
9s6osm5g
|
||||||
|
JYQhtZtO
|
||||||
|
KuNKN7d2
|
||||||
|
LQ3K71Q1
|
||||||
|
NNAgCjsB
|
||||||
|
P7dR8mSH
|
||||||
|
VSNURh3q
|
||||||
|
c7m1mi73
|
||||||
|
eXts2L7r
|
||||||
|
fQEb0iXm
|
||||||
|
g96Z4WVZ
|
||||||
|
gvQqBUqZ
|
||||||
|
mOgUt4GM
|
||||||
|
uXXizFIs
|
||||||
|
wnEe9KBa
|
||||||
|
veinminer
|
||||||
|
veinminer-client
|
||||||
|
)
|
||||||
|
|
||||||
|
# api_ids_query="%5B"
|
||||||
|
api_ids_query="["
|
||||||
|
|
||||||
|
for project_id in "${project_ids[@]}"; do
|
||||||
|
api_ids_query+="\\\"$project_id\\\""
|
||||||
|
done
|
||||||
|
|
||||||
|
# api_ids_query="${api_ids_query%",%20"}"
|
||||||
|
|
||||||
|
# api_ids_query+="%5D"
|
||||||
|
api_ids_query+="]"
|
||||||
|
|
||||||
|
api_command="wget -O- 'https://api.modrinth.com/v2/projects?ids=$api_ids_query'"
|
||||||
|
|
||||||
|
api_response=$("$api_command")
|
||||||
|
|
||||||
|
echo "$api_command"
|
||||||
|
echo "$api_response"
|
||||||
|
|
||||||
|
exit 0
|
||||||
31
scripts/shell/proj-llc-to-ffmpeg-helper.sh
Executable file
31
scripts/shell/proj-llc-to-ffmpeg-helper.sh
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
ffmpeg_commands_list=()
|
||||||
|
files_count=1
|
||||||
|
|
||||||
|
for file in ./*-proj.llc; do
|
||||||
|
llc_filename_new="${file}.json"
|
||||||
|
|
||||||
|
node -p "JSON.stringify(eval('(' + require('fs').readFileSync('${file}','utf8') + ')'), null, 2)" >"${llc_filename_new}"
|
||||||
|
|
||||||
|
media_filename=$(cat "${llc_filename_new}" | jq -r '.mediaFileName')
|
||||||
|
|
||||||
|
segments_qty=$(cat "${llc_filename_new}" | jq -r '.cutSegments | length')
|
||||||
|
|
||||||
|
for seq in $((segments_qty - 1)); do
|
||||||
|
seq_start=$(cat "${llc_filename_new}" | jq -r ".cutSegments[${seq}].start")
|
||||||
|
seq_end=$(cat "${llc_filename_new}" | jq -r ".cutSegments[${seq}].end")
|
||||||
|
|
||||||
|
ffmpeg_commands_list+=("ffmpeg-helper.sh -i \"${media_filename}\" --trim-start ${seq_start} --trim-end ${seq_end} --scale 1280x720 --crf 30 -o roadhog_${files_count}.mp4")
|
||||||
|
files_count=$((files_count + 1))
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
# rm ./*-proj.llc
|
||||||
|
# rm ./*-proj.llc.json
|
||||||
|
|
||||||
|
echo 'Results'
|
||||||
|
|
||||||
|
for cmd in "${ffmpeg_commands_list[@]}"; do
|
||||||
|
echo " ${cmd}"
|
||||||
|
done
|
||||||
@@ -21,13 +21,11 @@ is_sunshine_transmitting() {
|
|||||||
do_device_setup() {
|
do_device_setup() {
|
||||||
# trocar dispositivo padrão
|
# trocar dispositivo padrão
|
||||||
pactl set-default-sink "$default_device"
|
pactl set-default-sink "$default_device"
|
||||||
|
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
# conectar dispositivo virtual do OBS
|
# conectar dispositivo virtual do OBS
|
||||||
pw-link "$obs_device$obs_device_fl" "$sunshine_device$sunshine_device_fl"
|
pw-link "$obs_device$obs_device_fl" "$sunshine_device$sunshine_device_fl"
|
||||||
pw-link "$obs_device$obs_device_fr" "$sunshine_device$sunshine_device_fr"
|
pw-link "$obs_device$obs_device_fr" "$sunshine_device$sunshine_device_fr"
|
||||||
# talvez desconectar a saída do seu fone do sunshine??
|
# talvez desconectar a saída do seu fone do sunshine?
|
||||||
sleep 5
|
sleep 5
|
||||||
pw-link -d "$default_device$default_device_fl" "$sunshine_device$sunshine_device_fl"
|
pw-link -d "$default_device$default_device_fl" "$sunshine_device$sunshine_device_fl"
|
||||||
pw-link -d "$default_device$default_device_fr" "$sunshine_device$sunshine_device_fr"
|
pw-link -d "$default_device$default_device_fr" "$sunshine_device$sunshine_device_fr"
|
||||||
|
|||||||
19
snippets/arrays-intersections.js
Executable file
19
snippets/arrays-intersections.js
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
const versionsMatr = [
|
||||||
|
]
|
||||||
|
|
||||||
|
const loadersMatr = [
|
||||||
|
]
|
||||||
|
|
||||||
|
function intersectArrays(arrays) {
|
||||||
|
if (!arrays.length) return [];
|
||||||
|
|
||||||
|
return arrays.reduce((acc, curr) =>
|
||||||
|
acc.filter(item => curr.includes(item))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const versionsIntersection = intersectArrays(versionsMatr);
|
||||||
|
console.log(versionsIntersection);
|
||||||
|
|
||||||
|
const loadersIntersection = intersectArrays(loadersMatr);
|
||||||
|
console.log(loadersIntersection);
|
||||||
1
snippets/click-every-button-by-class.js
Executable file
1
snippets/click-every-button-by-class.js
Executable file
@@ -0,0 +1 @@
|
|||||||
|
document.querySelectorAll('button.MuiButtonGroup-lastButton').forEach(btn => btn.click());
|
||||||
Reference in New Issue
Block a user