Browse Source

make more changes to structure

master
James McDermott 2 years ago
parent
commit
a228f39e63
17 changed files with 0 additions and 81 deletions
  1. +0
    -0
      assembly_scripts/masm
  2. +0
    -0
      assembly_scripts/nasm
  3. +0
    -19
      backup
  4. +0
    -0
      college_scripts/activedesktop
  5. +0
    -0
      college_scripts/clickable
  6. +0
    -0
      college_scripts/cweb
  7. +0
    -0
      college_scripts/flickr
  8. +0
    -0
      college_scripts/getstockprice
  9. +0
    -0
      college_scripts/gweb
  10. +0
    -0
      college_scripts/resize
  11. +0
    -0
      college_scripts/xprog
  12. +0
    -12
      cryptde
  13. +0
    -12
      crypten
  14. +0
    -0
      mac_osx_scripts/lock
  15. +0
    -18
      mvfiles
  16. +0
    -20
      push
  17. +0
    -0
      redundant_scripts/up

masm → assembly_scripts/masm View File


nasm → assembly_scripts/nasm View File


+ 0
- 19
backup View File

@@ -1,19 +0,0 @@
#!/bin/sh

# Parent backup directory
parent_directory="/var/backup_server/$(hostname -s)"

# Directories to backup
backup_me_up_daddy="/etc /var/www /var/named /var/log /home"

# Check and create backup directory
date_of_backup=`date +%Y_%m_%d_%H_%M`
backup_directory=${parent_directory}/fs_${date_of_backup}
mkdir -p $backup_directory

# Perform backup
for directory in $backup_me_up_daddy
do
archive=`echo ${directory} | sed s/^\\\/// | sed s/\\\//_/g`
tar pcfzP ${backup_directory}/${archive}.tgz ${directory} 2>&1 | tee > ${backup_directory}/${archive}.log
done

activedesktop → college_scripts/activedesktop View File


clickable → college_scripts/clickable View File


cweb → college_scripts/cweb View File


flickr → college_scripts/flickr View File


getstockprice → college_scripts/getstockprice View File


gweb → college_scripts/gweb View File


resize → college_scripts/resize View File


xprog → college_scripts/xprog View File


+ 0
- 12
cryptde View File

@@ -1,12 +0,0 @@
#!/bin/bash
# cryptde - a script to decrypt files using openssl

FILE=$1

if [ $FILE == -h ]; then
echo "cryptde <name of file>";
echo " - cryptde is a script to decrypt des3 encrypted files";
exit;
fi

openssl des3 -d -salt -in "$FILE" -out "${FILE%.[^.]*}"

+ 0
- 12
crypten View File

@@ -1,12 +0,0 @@
#!/bin/bash
# crypten - a script to encrypt files using openssl

FILE=$1

if [ $FILE == -h ]; then
echo "crypten <name of file>";
echo " - crypten is a script to encrypt files using des3";
exit;
fi

openssl des3 -salt -in "$FILE" -out "$FILE.des3"

lock → mac_osx_scripts/lock View File


+ 0
- 18
mvfiles View File

@@ -1,18 +0,0 @@
#!/bin/bash

EXTENSION=$1
DESTINATION=$2
SOURCE=$3

# Example usage: mvfiles .zip ~/Desktop/zipfiles/ ~/Downloads/
# kind of just use this for when my downloads is clogged up
# and for when I need to move all files as a certain extension around for organisational purposes
cd "$SOURCE"
for file in "*$EXTENSION";
do
(mv $file "$DESTINATION" && echo "Moved files to $DESTINATION") || echo "No $EXTENSION files found..." && exit;

done

cd "$DESTINATION"
ls

+ 0
- 20
push View File

@@ -1,20 +0,0 @@
FILENAME=$2
OPTION=$1

if [ $OPTION == -b ];then
sshpass -p 'password' scp -r $FILENAME username@host:~/public_html/pages/blogs/;
fi
if [ $OPTION == -p ];then
sshpass -p 'password' scp -r $FILENAME username@host:~/public_html/pages/;
fi
if [ $OPTION == -i ];then
sshpass -p 'password' scp -r $FILENAME username@host:~/public_html/;
fi
if [ $OPTION == -s ];then
sshpass -p 'password' scp -r $FILENAME username@host:~/public_html/scripts/;
fi
if [ $OPTION == -c ];then
sshpass -p 'password' scp -r $FILENAME username@host:~/public_html/css/;
fi

echo -e "$FILENAME pushed!"

up → redundant_scripts/up View File


Loading…
Cancel
Save