<commit_before>function ssh-mdc() {
	/usr/bin/ssh -t "$@" '
	if (( $(who | wc -l) > 1 )); then
		printf "$(tput setaf 1)There is someone currenly logged in to this server, to continue safely have all other user log off while MDC script runs.$(tput sgr0)\n";
		w;
		exit 1;
	fi
	# REQUIRED PACKAGE INSTALL
	if [ -f /etc/redhat-release ]; then
		yum -y install screen curl bc;
	else
		apt-get -y install screen curl bc;
	fi

  link=https://raw.githubusercontent.com/mitapia/sh/master/mdc.sh
  script=mdc.sh
  
  # download script
  curl "$link" -o "$script";
  chmod +x "$script";
  
  # create screen
  screen -d -m -L -S mdc;
  # run script on screen
  screen -S mdc -p 0 -X exec ./"$script";
  # attach to screen
  screen -S mdc -r;
  
  rm "$script";'
}

function ssh-mdc-simulate() {
	/usr/bin/ssh -t "$@" '
	if (( $(who | wc -l) > 1 )); then
		printf "$(tput setaf 1)There is someone currenly logged in to this server, to continue safely have all other user log off while MDC script runs.$(tput sgr0)\n";
		w;
		exit 1;
	fi
	# REQUIRED PACKAGE INSTALL
	if [ -f /etc/redhat-release ]; then
		yum -y install screen curl bc;
	else
		apt-get -y install screen curl bc;
	fi

  link=https://raw.githubusercontent.com/mitapia/sh/master/mdc_simulate.sh
  script=mdc.sh
  
  # download script
  curl "$link" -o "$script";
  chmod +x "$script";
  
  # create screen
  screen -d -m -L -S mdc;
  # run script on screen
  screen -S mdc -p 0 -X exec ./"$script";
  # attach to screen
  screen -S mdc -r;
  
  rm "$script";'
}

function functions-update() {
	curl -O https://raw.githubusercontent.com/mitapia/sh/master/functions.sh;
	source functions.sh;
}

function ssh-verify-raid() {
	ssh "$@" "bash <(curl -s https://raw.githubusercontent.com/mitapia/sh/master/raid_verify.sh)";
}

# requested by: <NAME>
function ssh-rainbow() {
  ssh -t "$@" "
    cp ~/.bashrc ~/.bashrc.bak;
    echo 'export PS1=\"\[\$(tput bold)\]\[\$(tput setaf 1)\][\[\$(tput setaf 3)\]\u\[\$(tput setaf 2)\]@\[\$(tput setaf 6)\]\h \[\$(tput setaf 5)\]\W\[\$(tput setaf 1)\]]\[\$(tput setaf 7)\]\\\\$ \[\$(tput sgr0)\]\"' >> ~/.bashrc; 
    bash -i; 
    mv ~/.bashrc.bak ~/.bashrc;"
}<commit_msg>Added a guard against someone else logging in and messing with the server while an MDC script is running.<commit_after>function ssh-mdc() {
	/usr/bin/ssh -t "$@" '
	if (( $(who | wc -l) > 1 )); then
		printf "$(tput setaf 1)There is someone currenly logged in to this server, to continue safely have all other user log off while MDC script runs.$(tput sgr0)\n";
		w;
		exit 1;
	fi
	cp ~/.bash_profile ~/.bash_profile.bak;
    echo "printf \"\$(tput setaf 1)A Manual Drive Configuration script is currently in progress, logging out.\$(tput sgr0)\n\"" >> ~/.bash_profile; 
    echo "logout;" >> ~/.bash_profile; 

	# REQUIRED PACKAGE INSTALL
	if [ -f /etc/redhat-release ]; then
		yum -y install screen curl bc;
	else
		apt-get -y install screen curl bc;
	fi

  link=https://raw.githubusercontent.com/mitapia/sh/master/mdc.sh
  script=mdc.sh
  
  # download script
  curl "$link" -o "$script";
  chmod +x "$script";
  
  # create screen
  screen -d -m -L -S mdc;
  # run script on screen
  screen -S mdc -p 0 -X exec ./"$script";
  # attach to screen
  screen -S mdc -r;
  
  rm "$script";
  mv ~/.bash_profile.bak ~/.bash_profile;'
}

function ssh-mdc-simulate() {
	/usr/bin/ssh -t "$@" '
	if (( $(who | wc -l) > 1 )); then
		printf "$(tput setaf 1)There is someone currenly logged in to this server, to continue safely have all other user log off while MDC script runs.$(tput sgr0)\n";
		w;
		exit 1;
	fi
	cp ~/.bash_profile ~/.bash_profile.bak;
    echo "printf \"\$(tput setaf 1)A Manual Drive Configuration script is currently in progress, logging out.\$(tput sgr0)\n\"" >> ~/.bash_profile; 
    echo "logout;" >> ~/.bash_profile; 
    
	# REQUIRED PACKAGE INSTALL
	if [ -f /etc/redhat-release ]; then
		yum -y install screen curl bc;
	else
		apt-get -y install screen curl bc;
	fi

  link=https://raw.githubusercontent.com/mitapia/sh/master/mdc_simulate.sh
  script=mdc.sh
  
  # download script
  curl "$link" -o "$script";
  chmod +x "$script";
  
  # create screen
  screen -d -m -L -S mdc;
  # run script on screen
  screen -S mdc -p 0 -X exec ./"$script";
  # attach to screen
  screen -S mdc -r;
  
  rm "$script";
  mv ~/.bash_profile.bak ~/.bash_profile;'
}

function functions-update() {
	curl -O https://raw.githubusercontent.com/mitapia/sh/master/functions.sh;
	source functions.sh;
}

function ssh-verify-raid() {
	ssh "$@" "bash <(curl -s https://raw.githubusercontent.com/mitapia/sh/master/raid_verify.sh)";
}

# requested by: <NAME>
function ssh-rainbow() {
  ssh -t "$@" "
    cp ~/.bashrc ~/.bashrc.bak;
    echo 'export PS1=\"\[\$(tput bold)\]\[\$(tput setaf 1)\][\[\$(tput setaf 3)\]\u\[\$(tput setaf 2)\]@\[\$(tput setaf 6)\]\h \[\$(tput setaf 5)\]\W\[\$(tput setaf 1)\]]\[\$(tput setaf 7)\]\\\\$ \[\$(tput sgr0)\]\"' >> ~/.bashrc; 
    bash -i; 
    mv ~/.bashrc.bak ~/.bashrc;"
}
{'fraction_non_alphanumeric': 0.17572463768115942, 'fraction_numerical': 0.008454106280193236, 'mean_word_length': 2.8459752321981426, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '48122', 'n_tokens_mistral': 2046, 'n_tokens_neox': 1901, 'n_words': 576}