Added scripts...

This commit is contained in:
maximstewart 2021-02-20 20:33:40 -06:00
parent 789cfefacd
commit 06ca6a91ae
25 changed files with 14958 additions and 0 deletions

View File

@ -0,0 +1,127 @@
#!/bin/bash
function createJavaData() {
createMainClassData "${PACKAGE}";
createControlClass "${PACKAGE}"
createLoggerClassData "${PACKAGE}";
createFXMLData "${PACKAGE}";
}
function createControlClass() {
read -d '' CONTROLCLASS << EOF
package com.${COMPANYNAME,,}.${PACKAGE,,};
import javafx.fxml.FXML;
public class Controller {
// Classes
// FXML Stuff
// Generics
@FXML void initialize() {
}
}
EOF
echo "${CONTROLCLASS}" > "${PACKAGE}"/src/Controller.java
}
function createMainClassData() {
read -d '' MAINCLASS << EOF
package com.${COMPANYNAME,,}.${PACKAGE,,};
import com.${COMPANYNAME,,}.${PACKAGE,,}.utils.${PACKAGE}Logger;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import java.util.logging.Level;
import java.io.IOException;
public class ${PACKAGE} extends Application {
// Classes
private ${PACKAGE}Logger ${PACKAGE,,}Logger = ${PACKAGE}Logger.getInstance();
@Override public void start(Stage stage) {
try {
FXMLLoader loader = new FXMLLoader(getClass().getResource(\"resources/${PACKAGE}.fxml\"));
loader.setController(new Controller());
loader.load();
Scene scene = new Scene(loader.getRoot());
scene.getStylesheets().add(\"/com/${COMPANYNAME}/${PACKAGE,,}/resources/stylesheet.css\");
stage.setTitle(\"${PACKAGE}\");
stage.setScene(scene);
} catch (IOException startException) {
String message = "\\\n${PACKAGE} Failed to launch...\\\n";
System.out.println(message + startException);
${PACKAGE,,}Logger.insertToLog(Level.SEVERE, message, startException);
}
// stage.getIcons().add(new Image(${PACKAGE}.class.getResourceAsStream(\"resources/${PACKAGE}.png\")));
stage.setResizable(true);
stage.show();
}
public static void main(String[] args) { launch(args); }
}
EOF
echo "${MAINCLASS}" > "${PACKAGE}"/src/"${PACKAGE}".java
}
function createLoggerClassData() {
read -d '' LOGGERCLASS << EOF
package com.${COMPANYNAME,,}.${PACKAGE,,}.utils;
import java.util.logging.Logger;
import java.util.logging.Level;
import java.util.logging.FileHandler;
import java.io.IOException;
public class ${PACKAGE}Logger {
private static ${PACKAGE}Logger ${PACKAGE,,}Logger = new ${PACKAGE}Logger();
private Logger logger = Logger.getLogger(${PACKAGE}Logger.class.getName());
private boolean append = false;
// Instance passer
public static ${PACKAGE}Logger getInstance() { return ${PACKAGE,,}Logger; }
// Init ${PACKAGE}Logger
private ${PACKAGE}Logger() {
try {
FileHandler logFile = new FileHandler(\"${PACKAGE,,}_error.log\", append);
logger.addHandler(logFile);
} catch (IOException e) {
insertToLog(Level.SEVERE, \"Can not access error log file...\", e);
e.printStackTrace();
}
}
public void insertToLog(Level severity, String message, Exception stackTrace) {
logger.log(severity, message, stackTrace);
}
}
EOF
echo "${LOGGERCLASS}" > "${PACKAGE}"/src/utils/"${PACKAGE}"Logger.java
}
function createFXMLData() {
read -d '' FXMLDATA << EOF
EOF
echo "${FXMLDATA}" > "${PACKAGE}"/com/"${COMPANYNAME,,}"/"${PACKAGE,,}"/resources/"${PACKAGE}".fxml
}

View File

@ -0,0 +1,47 @@
#!/bin/bash
function createScriptData() {
read -d '' COMPILESCRIPT << EOF
#!/bin/bash
# -Xlint:unchecked
function main() {
javac *.java utils/*.java
rm ../com/${COMPANYNAME,,}/${PACKAGE,,}/*.class
rm ../com/${COMPANYNAME,,}/${PACKAGE,,}/utils/*.class
mv *.class ../com/${COMPANYNAME,,}/${PACKAGE,,}/
mv utils/*.class ../com/${COMPANYNAME,,}/${PACKAGE,,}/utils/
}
main;
EOF
read -d '' BUILDJARSCRIPT << EOF
#!/bin/bash
function main() {
jar cvfm ${PACKAGE}.jar manifest.txt com/${COMPANYNAME,,}/${PACKAGE,,}/*.class \
com/${COMPANYNAME,,}/${PACKAGE,,}/utils/*.class \
com/${COMPANYNAME,,}/${PACKAGE,,}/resources
chmod +x ${PACKAGE}.jar
mv ${PACKAGE}.jar bin/
}
main;
EOF
echo "${COMPILESCRIPT}" > "${PACKAGE}"/src/unix_compile.sh
echo "${BUILDJARSCRIPT}" > "${PACKAGE}"/buildJar.sh
}
function createManifest() {
read -d '' MANIFESTDATA <<- EOF
Class-Path:
SplashScreen-Image: com/${COMPANYNAME,,}/${PACKAGE,,}/resources/${PACKAGE}Splash.jpg
Main-Class: com.${COMPANYNAME,,}.${PACKAGE,,}.${PACKAGE}
EOF
echo "${MANIFESTDATA}" > "${PACKAGE}"/manifest.txt
}

View File

@ -0,0 +1,62 @@
#!/bin/bash
. insert_script_data.sh
. insert_base_Java_data.sh
function main() {
clear;
echo "Name of package with proper Upercase convention...";
read -p "-> : " PACKAGE;
echo -e "\n\nName of your company or group to setup Jar structure...\n" \
"Usage Example: com/<companyORgroup>/${PACKAGE,,}" \
"Note: This will be made lowercase."
read -p "-> : " COMPANYNAME;
echo -e "\n\nMaking directories...";
sleep 1;
makeDirs "${PACKAGE}" "${COMPANYNAME}";
echo "Making source files...";
sleep 1;
makeSrcFiles "${PACKAGE}" "${COMPANYNAME}";
echo "Inserting script data to compile and build scripts...";
sleep 1;
createScriptData "${PACKAGE}" "${COMPANYNAME}";
echo "Creating basic Manifest file for Jar building...";
sleep 1;
createManifest "${PACKAGE}" "${COMPANYNAME}";
echo "Inserting basic Java data to ${PACKAGE} and its ${PACKAGE,,}Logger ...";
sleep 1;
createJavaData "${PACKAGE}" "${COMPANYNAME}";
echo -e "\t\t\nFinished!\n";
openOrExit "${PACKAGE}";
}
function makeDirs() {
mkdir -p "${PACKAGE}"/bin/resources/ "${PACKAGE}"/src/ "${PACKAGE}"/src/utils/ \
"${PACKAGE}"/com/"${COMPANYNAME,,}"/"${PACKAGE,,}"/resources \
"${PACKAGE}"/com/"${COMPANYNAME,,}"/"${PACKAGE,,}"/utils
}
function makeSrcFiles() {
touch "${PACKAGE}"/com/"${COMPANYNAME,,}"/"${PACKAGE,,}"/resources/"${PACKAGE}".fxml \
"${PACKAGE}"/com/"${COMPANYNAME,,}"/"${PACKAGE,,}"/resources/stylesheet.css \
"${PACKAGE}"/src/unix_compile.sh "${PACKAGE}"/buildJar.sh "${PACKAGE}"/manifest.txt \
"${PACKAGE}"/src/"${PACKAGE}".java "${PACKAGE}"/src/utils/"${PACKAGE}"Logger.java \
"${PACKAGE}"/src/Controller.java
# Make scripts runnable
chmod 744 "${PACKAGE}"/src/unix_compile.sh
chmod 744 "${PACKAGE}"/buildJar.sh
}
function openOrExit() {
echo -e "Open ${PACKAGE}/src/Controller.java\n"
read -p "-->(Yy/Nn): " ANS;
case "${ANS,,}" in
y ) atom "${PACKAGE}"/src/Controller.java & ;;
n ) exit ;;
* ) ;;
esac
}
main;

View File

@ -0,0 +1,19 @@
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
function main() {
SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )"
cd "${SCRIPTPATH}"
echo "Working Dir: " $(pwd)
cat page.lst| while read line; do
wget "$(wget "$line" -O- -q|grep ".zip"|grep "product_download_url"|sed 's/http/\nhttp/g'|grep "download.f"|cut -d\" -f1)";
done
}
main $@;

View File

@ -0,0 +1,50 @@
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
dots() {
while [ 1 ]; do
sleep 1
echo -n "."
done
}
function main() {
SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )"
cd "${SCRIPTPATH}"
echo "Working Dir: " $(pwd)
clear
echo -n "Getting URLs of ROM pages."
dots&
dotid=$!
for i in {A..Z}; do
wget -O- -q "http://www.freeroms.com/gameboy_color_roms_$i.htm"|\
grep "game_id.value"|\
sed 's/http/\nhttp/g'|\
grep "^http"|\
cut -d\" -f1|\
grep htm
done > page.lst
echo ""
echo "Creating ROM list."
echo "This will take a while."
cat page.lst|while read line;do
wget "$line" -O- -q|\
grep ".zip"|\
grep "product_download_url"|\
sed 's/http/\nhttp/g'|\
grep "download.f"|\
cut -d\" -f1;
done > rom.lst
echo ""
echo "ROM list complete!"
kill $dotid
}
main $@;

View File

@ -0,0 +1,17 @@
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
function main() {
SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )"
cd "${SCRIPTPATH}"
echo "Working Dir: " $(pwd)
mkdir a b c d e f g h i j k l m n o p q r s t u v w x y z
}
main $@;

View File

@ -0,0 +1,18 @@
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
function main() {
SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )"
cd "${SCRIPTPATH}"
echo "Working Dir: " $(pwd)
for i in /usr/share/applications/*.desktop; do which $(grep -Poh '(?<=Exec=).*?( |$)' $i) > /dev/null || sudo rm $i; done
for i in ~/.local/share/applications/*.desktop; do which $(grep -Poh '(?<=Exec=).*?( |$)' $i) > /dev/null || sudo rm $i; done
}
main $@;

View File

@ -0,0 +1,18 @@
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
function main() {
SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )"
cd "${SCRIPTPATH}"
echo "Working Dir: " $(pwd)
find . -name "__pycache__" -exec rm -rf $1 {} \;
find . -name "*.pyc" -exec rm -rf $1 {} \;
}
main $@;

21
src/Scripts/Utils/compress.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
function main() {
SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )"
cd "${SCRIPTPATH}"
echo "Working Dir: " $(pwd)
for i in `ls`; do
if [[ -d "${i}" ]]; then
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on "${i}".7z ./"${i}"
fi
done
}
main

View File

@ -0,0 +1,21 @@
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
function main() {
SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )"
cd "${SCRIPTPATH}"
echo "Working Dir: " $(pwd)
input=$(zenity --entry --text="Please put your missing key(s) here.
It will be in hexadecimal format.
Example: 16126D3A3E5C1192")
PASSWD="$(zenity --password --title=Authentication)"
echo -e $PASSWD | sudo -S apt-key adv --keyserver keyserver.ubuntu.com --recv-keys "${input}"
}
main $@;

View File

@ -0,0 +1,34 @@
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
main() {
pre="http://cdn.mynoise.net/Data/";
src=$(zenity --entry --title="Grab Sounds" --text "What is the MyNoise CDN Data Directory?");
mkdir "${src}"
wget "${pre}""${src}"/1a.ogg -P "${src}"
wget "${pre}""${src}"/2a.ogg -P "${src}"
wget "${pre}""${src}"/3a.ogg -P "${src}"
wget "${pre}""${src}"/4a.ogg -P "${src}"
wget "${pre}""${src}"/5a.ogg -P "${src}"
wget "${pre}""${src}"/6a.ogg -P "${src}"
wget "${pre}""${src}"/7a.ogg -P "${src}"
wget "${pre}""${src}"/8a.ogg -P "${src}"
wget "${pre}""${src}"/9a.ogg -P "${src}"
wget "${pre}""${src}"/1b.ogg -P "${src}"
wget "${pre}""${src}"/2b.ogg -P "${src}"
wget "${pre}""${src}"/3b.ogg -P "${src}"
wget "${pre}""${src}"/4b.ogg -P "${src}"
wget "${pre}""${src}"/5b.ogg -P "${src}"
wget "${pre}""${src}"/6b.ogg -P "${src}"
wget "${pre}""${src}"/7b.ogg -P "${src}"
wget "${pre}""${src}"/8b.ogg -P "${src}"
wget "${pre}""${src}"/9b.ogg -P "${src}"
}
main $@;

View File

@ -0,0 +1,32 @@
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
function main() {
SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )"
cd "${SCRIPTPATH}"
echo "Working Dir: " $(pwd)
clear
answer=$(zenity --text "Please chose which Marathon game to launch!" \
--list --radiolist --column "Options" --column "Description" \
TRUE "Marathon" \
FASLSE "Marathon 2" \
FALSE "Marathon Infinity")
if [[ "${answer}" == "Marathon" ]]; then
alephone /usr/local/share/AlephOne/Marathon/
elif [[ "${answer}" == "Marathon 2" ]]; then
alephone /usr/local/share/AlephOne/Marathon-2/
elif [[ "${answer}" == "Marathon Infinity" ]]; then
alephone /usr/local/share/AlephOne/Marathon-Infinity/
else
zenity --warning --text "An error occured, re-running....";
sleep 2;
main;
fi
}
main $@;

View File

@ -0,0 +1,96 @@
#
# By Maxim F. Stewart
# Contact: [1itdominator@gmail.com]
#
# Copyright 2013 Maxim F. Stewart
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#---------------------------------------------------------------------------------------#
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
main_menu() {
clear
echo "_________________________________________________________________"
echo "| |"
echo "|<-- 0 -- Extract md5 hashes -->|"
echo "|<-- 1 -- Extract valid MySQL-Old hashes -->|"
echo "|<-- 2 -- Extract blowfish hashes -->|"
echo "|<-- 3 -- Extract Joomla hashes -->|"
echo "|<-- 4 -- Extract VBulletin hashes -->|"
echo "|<-- 5 -- Extraxt phpBB3-MD5 -->|"
echo "|<-- 6 -- Extract Wordpress-MD5 -->|"
echo "|<-- 7 -- Extract Drupal 7 -->|"
echo "|<-- 8 -- Extract old Unix-md5 -->|"
echo "|<-- 9 -- Extract md5-apr1 -->|"
echo "|<-- 10 -- Extract sha512crypt, SHA512(Unix) -->|"
echo "|<-- 11 -- Extract e-mails from text files -->|"
echo "|<-- 12 -- Extract HTTPS, FTP and other URL Formats -->|"
echo "|<-- 13 -- EXIT Quick Hash Extractor -->|"
echo "|_______________________________________________________________|"
echo " | Quick Hash Extractor ver: 0.2.0 | "
echo " |____________________________________| "
echo " "
read -p " Enter one of the numbers indicated above --> $: " NUMBER
errorMsg
}
main() {
SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )"
cd "${SCRIPTPATH}"
echo "Working Dir: " $(pwd)
case $NUMBER in
[0]* ) egrep -oE '(^|[^a-fA-F0-9])[a-fA-F0-9]{32}([^a-fA-F0-9]|\$)' *.txt | egrep -o '[a-fA-F0-9]{32}' > md5-hashes.txt ;;
[1]* ) grep -e "[0-7][0-9a-f]\{7\}[0-7][0-9a-f]\{7\}" *.txt > mysql-old-hashes.txt ;;
[2]* ) grep -e "\$2a\\$\08\\$\(.\)\{75\}" *.txt > blowfish-hashes.txt ;;
[3]* ) egrep -o "([0-9a-zA-Z]{32}):(\w{16,32})" *.txt > joomla.txt ;;
[4]* ) egrep -o "([0-9a-zA-Z]{32}):(\S{3,32})" *.txt > vbulletin.txt ;;
[5]* ) egrep -o '\$H\$\S{31}' *.txt > phpBB3-md5.txt ;;
[6]* ) egrep -o '\$P\$\S{31}' *.txt > wordpress-md5.txt ;;
[7]* ) egrep -o '\$S\$\S{52}' *.txt > drupal-7.txt ;;
[8]* ) egrep -o '\$1\$\w{8}\S{22}' *.txt > md5-unix-old.txt ;;
[9]* ) egrep -o '\$apr1\$\w{8}\S{22}' *.txt > md5-apr1.txt ;;
[10]* ) egrep -o '\$6\$\w{8}\S{86}' *.txt > sha512crypt.txt ;;
[11]* ) grep -E -o "\b[a-zA-Z0-9.#?$*_-]+@[a-zA-Z0-9.#?$*_-]+\.[a-zA-Z0-9.-]+\b" *.txt > e-mails.txt ;;
[12]* ) grep -E '(((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]' *.txt > urls.txt ;;
[13]* ) clear && echo "
___ ______ __
| \ \ / | | |
|___| \ / |_____ | |
| | | | |__|
|___\ | |_____ __
|__|" ; sleep 2; clear; exit
esac ;
sleep 2 && clear && main_menu
}
errorMsg() {
if [ $NUMBER -eq 0 -o 1 -o 2 -o 3 -o 4 -o 5 -o 6 -o 7 -o 8 -o 9 -o 10 -o 11 -o 12 -o 13 ]; then
main else
clear
echo "!!Remember!! Please enter a preselected number!"
sleep 2
clear
main_menu
fi
}
main_menu

View File

@ -0,0 +1,22 @@
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
function main() {
SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )"
cd "${SCRIPTPATH}"
echo "Working Dir: " $(pwd)
sudo apt-get update;
sudo apt-get dist-upgrade;
sudo apt-get install pavucontrol linux-sound-base alsa-base alsa-utils linux-image-`uname -r` libasound2;
sudo apt-get -y --reinstall install linux-sound-base alsa-base alsa-utils linux-image-`uname -r` libasound2;
killall pulseaudio;
rm -r ~/.pulse*; ubuntu-support-status; sudo usermod -aG `cat /etc/group | grep -e '^pulse:' -e '^audio:' -e '^pulse-access:' -e '^pulse-rt:' -e '^video:' | awk -F: '{print $1}' | tr '\n' ',' | sed 's:,$::g'` `whoami`
}
main $@;

View File

@ -0,0 +1,48 @@
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
pre_main() {
if [ -f $HOME/.config/dreamShuffle/conf.txt ]; then
main;
else
mkdir $HOME/.config/dreamShuffle/
touch $HOME/.config/dreamShuffle/conf.txt
rootDreamScene=$(zenity --entry --text "Please select the root directory of your Dreamscene file(s)!
Note: All files must be in a single directory.
Ie: Just in folder1/ NOT in folder1/ and folder1/sub1/ folder2/ etc" --entry-text "");
echo ${rootDreamScene} > $HOME/.config/dreamShuffle/conf.txt
fi
}
function main() {
SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )"
cd "${SCRIPTPATH}"
echo "Working Dir: " $(pwd)
pre_main
i=1;
IFS=$'\n'
rootDir=$(cat $HOME/.config/dreamShuffle/conf.txt)
files=($( find ${rootDir} -type f ))
fc=${#files[@]}
while [ $i -eq $i ]; do
killall xwinwrap
mon1=$(shuf -i1-$fc -n1)
xwinwrap -ov -g 1920x1080 -st -sp -b -nf -s -ni -- mplayer -wid WID -loop 0 ${files[mon1]} &
mon2=$(shuf -i1-$fc -n1)
xwinwrap -ov -g 1600x900+1920+0 -st -sp -b -nf -s -ni -- mplayer -wid WID -loop 0 ${files[mon2]} &
sleep 120 ;
done
}
main $@;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,19 @@
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
function main() {
SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )"
cd "${SCRIPTPATH}"
echo "Working Dir: " $(pwd)
VBoxManage internalcommands createrawvmdk \
-filename "Win7HDD.vmdk" -rawdisk /dev/sdb \
-partitions 1,2
}
main $@;

View File

@ -0,0 +1,37 @@
#!/bin/bash
echo -e "
########################################################
# ____________ _______ . ____ ____ #
# | | | | | \ / | | #
# | | | | | \ / | |____ |____ #
# | | | | | \ / | | | #
# | | | |_____| \/ | |____ _____| #
# #
########################################################" > ./"Movies and Tv List".txt
ls -R ./Movies/* >> ./"Movies and Tv List".txt
echo -e "
############################
# _________ #
# | \ / #
# | \ / #
# | \ / #
# | \/ #
# #
############################" >> ./"Movies and Tv List".txt
ls -R ./TV/* >> ./"Movies and Tv List".txt
echo -e "
##############################################
# _________ _____ * _______ #
# | | | | | | | | #
# | | | | | |____ | | #
# | | | | | | | | #
# | | | |____| _____| | |_______ #
# #
##############################################" >> ./"Movies and Tv List".txt
ls -R ./Music/ >> ./"Movies and Tv List".txt

82
src/Scripts/profile_backup.sh Executable file
View File

@ -0,0 +1,82 @@
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
function main() {
clear
BACKUPDIR="${HOME}/Downloads/Linux-Profile"
echo "Backing up to: " ${BACKUPDIR}
rm -rf ${BACKUPDIR}
mkdir ${BACKUPDIR}
# Dirs
echo "Backing up .config/ ..."
cp -r ${HOME}/.config/ ${BACKUPDIR}
echo "Backing up .screenlayout/ ..."
cp -r ${HOME}/.screenlayout/ ${BACKUPDIR}
echo "Backing up .themes/ ..."
cp -r ${HOME}/.themes/ ${BACKUPDIR}
echo "Backing up .icons/ ..."
cp -r ${HOME}/.icons/ ${BACKUPDIR}
echo "Backing up .devilspie* ..."
cp -r ${HOME}/.devilspie* ${BACKUPDIR}
echo "Backing up .mplayer/ ..."
cp -r ${HOME}/.mplayer/ ${BACKUPDIR}
echo "Backing up .atom/ ..."
cp -r ${HOME}/.atom/ ${BACKUPDIR}
echo "Backing up .qjoypad3/ ..."
cp -r ${HOME}/.qjoypad3/ ${BACKUPDIR}
echo "Backing up .local/share/applications/ ..."
cp -r ${HOME}/.local/share/applications/ ${BACKUPDIR}
echo "Backing up .local/share/fonts/ ..."
cp -r ${HOME}/.local/share/fonts/ ${BACKUPDIR}
# Files
echo "Backing up .bash files..."
cp ${HOME}/.bash* ${BACKUPDIR}
echo "Backing up .start script..."
cp ${HOME}/.start ${BACKUPDIR}
echo "Backing up .gtk files..."
cp ${HOME}/.gtk* ${BACKUPDIR}
echo "Backing up .animatedBGstarter scripts..."
cp ${HOME}/.animatedBGstarter*.sh ${BACKUPDIR}
echo "Backing up .greetings.mp3 sound..."
cp ${HOME}/.greetings.mp3 ${BACKUPDIR}
echo "Backing up .vim files..."
cp ${HOME}/.vim* ${BACKUPDIR}
# Remove undesirables
echo "Removing undesirables..."
rm -rf ${BACKUPDIR}/.config/Atom
rm -rf ${BACKUPDIR}/.config/Code
rm -rf ${BACKUPDIR}/.config/aseprite
rm -rf ${BACKUPDIR}/.config/blender
rm -rf ${BACKUPDIR}/.config/discord
rm -rf ${BACKUPDIR}/.config/SpiderOakONE
rm -rf ${BACKUPDIR}/.config/streamio
rm -rf ${BACKUPDIR}/.config/VirtualBox
rm -rf ${BACKUPDIR}/.config/retroarch/cheats
rm -rf ${BACKUPDIR}/.atom/.apm
rm -rf ${BACKUPDIR}/.atom/blob-store
rm -rf ${BACKUPDIR}/.atom/.gitignore
rm -rf ${BACKUPDIR}/.atom/nohup.out
rm -rf ${BACKUPDIR}/.atom/recovery
rm -rf ${BACKUPDIR}/.atom/storage
rm -rf ${BACKUPDIR}/.atom/.atom-socket-secret-abaddon-*
rm -rf ${BACKUPDIR}/.atom/compile-cache
rm -rf ${BACKUPDIR}/.atom/github.cson
rm -rf ${BACKUPDIR}/.atom/.node-gyp
rm -rf ${BACKUPDIR}/.atom/packages
find ${BACKUPDIR} -name "*Cache*" -exec rm -rf $1 {} \;
find ${BACKUPDIR} -name "*cache*" -exec rm -rf $1 {} \;
find ${BACKUPDIR} -name "*.log" -exec rm -rf $1 {} \;
}
main $@;

88
src/Scripts/system_admin.sh Executable file
View File

@ -0,0 +1,88 @@
#
# By Maxim F. Stewart
# Contact: [1itdominator.com]
#
# Copyright 2013 Maxim F. Stewart
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#---------------------------------------------------------------------------------------#
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
show_menu() {
clear
pathLocal=""
echo "__________________________________________________________________"
echo "| |"
echo "|<- 0. to upgrd your distrobution to a more current version. ->|"
echo "|<- 1. to update pkg list and upgrade system pkgs. ->|"
echo "|<- 2. to install a pkg WITH Suggests and Recommends. ->|"
echo "|<- 3. to install a pkg WITHOUT Suggests and Recommends. ->|"
echo "|<- 4. to remove and purge a pkg. ->|"
echo "|<- 5. to run a program as root. ->|"
echo "|<- 6. Mozilla folder backup to Dropbox. ->|"
echo "|<- Press 7 to exit. ->|"
echo "|________________________________________________________________|"
echo " | Awesome Bash Script ver: 0.2.0 | "
echo " |____________________________________| "
echo ""
read -p " Enter one of the numbers indicated above --> $: " NUMBER
errorMsg
}
errorMsg() {
if [ $NUMBER -eq 0 -o 1 -o 2 -o 3 -o 4 -o 5 -o 6 -o 7 ]; then
main else
clear
echo "!!Remember!! Please enter a preselected number!"
sleep 2
clear
show_menu
fi
}
main() {
show_menu
case $NUMBER in
[0]* ) sudo apt-get dist-upgrade;;
[1]* ) sudo apt-get update && apt-get upgrade;;
[2]* ) clear; read -p "Suggests and Recommends will be installed with selected Pkg. --> $: " PROG \
sudo apt-get update && apt-get install $PROG -y ;;
[3]* ) clear; read -p "Suggests and Recommends WILL NOT be installed with Pkg. --> $: " PROG \
sudo apt-get update && apt-get --no-install-recommends --no-install-suggests install $PROG -y ;;
[4]* ) clear; read -p "Enter the pkg name please. --> $: " PROG \
sudo apt-get remove --purge $PROG && apt-get autoremove -y && apt-get autoclean -y ;;
[5]* ) clear; read -p "What would you like to run? --> $: " PROG ; $PROG &;;
[6]* )
if [ -d $HOME/$pathLocal/Documents/BackupsForSystem/mozilla.7z ]; then
rm -rf $HOME/$pathLocal/Documents/BackupsForSystem/mozilla.7z
fi
if [ -d $HOME/.mozilla ]; then
7z a -t7z -mx=9 $HOME/$pathLocal/Documents/BackupsForSystem/mozilla.7z $HOME/.mozilla
fi ;;
[7]* ) clear && echo "
____ ______ __
| \ \ / | | |
|___| \ / |_____ | |
| | | | |__|
|___\ | |_____ __
|__| " ; sleep 2; clear; exit;
esac
}
main $@;

53
src/Scripts/system_info.sh Executable file
View File

@ -0,0 +1,53 @@
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
function main() {
SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )"
cd "${SCRIPTPATH}"
echo "Working Dir: " $(pwd)
clear
displayVariabls
displayLSB
displayCPU
displayDisks
displayMemory
}
function displayVariabls() {
echo "USER: " $USER
echo "SHELL: " $SHELL
echo "PATH: " $PATH
}
function displayLSB() {
echo -e "\n---- LSB_RELEASE ----"
lsb_release -a
}
function displayCPU() {
echo -e "\n---- BASIC_CPU_INFO ----"
echo -e "Note: For more deatails, use -> cat /proc/cpuinfo\n"
cat /proc/cpuinfo | grep "cpu cores" | head -n 1
cat /proc/cpuinfo | grep "vendor_id" | head -n 1
cat /proc/cpuinfo | grep "model name" | head -n 1
}
function displayDisks() {
echo -e "\n---- DISK_INFO ----"
df -h | grep "/dev/sd"
# lsblk
}
function displayMemory() {
echo -e "\n---- MEMORY_INFO ----"
free
}
main;