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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VM_BOX = ENV["VM_BOX"] || "fedora/33-cloud-base" | |
VM_RAM = ENV["VM_RAM"] || "1536" | |
VM_CPU = ENV["VM_CPU"] || "2" | |
### Fedora Spins -> https://spins.fedoraproject.org | |
spins = %w( | |
gnome |
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 os | |
def parent_directory(): | |
# Create a relative path to the parent | |
# of the current working directory | |
relative_parent = os.path.join("..") | |
# Return the absolute path of the parent directory | |
return os.path.abspath(relative_parent) | |
print(parent_directory()) |
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
if [ $# -ne 0 ] | |
then | |
for VIDEO in "$@" | |
do | |
VIDEO_NAME=$(echo "$VIDEO" | cut -d. -f1) | |
VIDEO_x265="$VIDEO_NAME".x265.mp4 | |
ffmpeg -i "$VIDEO" -c:v libx265 "$VIDEO_x265" \ | |
&& RESULT="$RESULT$(\ | |
echo "Successfully converted -> $VIDEO_NAME" && \ | |
echo " original: %2s $(ls -lh "$VIDEO" | cut -d' ' -f5)" && \ |
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 python3 | |
import re | |
import sys | |
import subprocess | |
try: | |
file_to_crop = sys.argv[1] | |
except: | |
print("Please provide a video file.") |
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 | |
if [ $# = 1 ] | |
then | |
LIST=`ls | grep -i "$1" | sed -e "s/^/file '/" -e "s/$/'/"` | |
if [[ -f list ]] | |
then | |
read -p "Do you want to overwrite the already existing 'list' file? (y/N) " yn | |
case $yn in | |
[yY]* ) echo -e "\nOverwriting already existing 'list' file with the following content:\n" |
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 | |
HOU=0 | |
MIN=0 | |
SEC=0 | |
if [[ $# -ge 4 ]] | |
then | |
echo "Please provide from 0 to a maximum of 3 arguments" | |
exit 1 |
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 | |
IFS=$'\n' | |
ARGUMENTS=$# | |
GAME_ZIP="$1" | |
GAME_NOZIP="${GAME_ZIP%.zip}" | |
GAME_NODISC="${GAME_NOZIP% *isc*}" | |
GAME_DIR=$GAME_NODISC | |
DISC=1 |
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 | |
for ((COUNTER=1; COUNTER>0; COUNTER++)) | |
do | |
echo "$(date +%c) => Test nr: $COUNTER" && \ | |
speedtest-cli 2>/dev/null | grep -E "^Download|^Upload" | |
done |
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 | |
# put current clipboard in a variable | |
XCLIP_CLIPBOARD="$(xclip -o -selection clipboard)" | |
XCLIP_SELECTION=$XCLIP_CLIPBOARD | |
if [ $# -ge 1 ] | |
then | |
# print the initial string aka the current clipboard | |
echo "=> 1st string: $XCLIP_CLIPBOARD" |
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 | |
ROOT_DIRECTORY=`basename "$(pwd)"` | |
ARGUMENTS_NR=$# | |
ARGUMENTS=$@ | |
yt-dlp-mkdir () { | |
for i in $ARGUMENTS | |
do | |
declare -a DIRECTORY="(`basename $i | tr "-" " "`)" |
OlderNewer