This file contains hidden or 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/sh | |
| # sed -e 's/^[ \t]*//;s/[ \t]*$//' -e '/^#/d' -e '/^$/d' | |
| if [ -z $1 ]; then exit 0; else true; fi | |
| xz -kf9 $1 | |
| printf '#!/bin/sh\nx=`tempfile`;echo ' > ${1}-min | |
| base64 -w 0 ${1}.xz >> ${1}-min | |
| printf '|base64 -d|xz -d>$x && chmod +x $x && $x $@; rm $x' >> ${1}-min | |
| rm -f ${1}.xz | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # === AutoMySQLBackup === | |
| if [[ $run_all = false ]]; then | |
| echo -n "Install AutoMySQLBackup? (y/n) [default: n]: " | |
| read automysqlbackup | |
| fi | |
| if [ "$automysqlbackup" = "y" ] || [ $run_all = true ]; then | |
| show_notice "Installing AutoMySQLBackup..." | |
| apt-get install -y automysqlbackup | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # remgit.sh | |
| # Creates a remote git repository from the current local directory | |
| # Configuration | |
| # Replace SSH_USERNAME, SSH_HOST, SSH_GIT_PATH with your details | |
| USER=SSH_USERNAME | |
| HOST=SSH_HOST | |
| GIT_PATH=SSH_GIT_PATH | |
| REPO=${PWD##*/} | 
  
    
      This file contains hidden or 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
    
  
  
    
  | A regular expression may be followed by one of several repetition operators: | |
| ‘.’ The period ‘.’ matches any single character. | |
| ‘?’ The preceding item is optional and will be matched at most once. | |
| ‘*’ The preceding item will be matched zero or more times. | |
| ‘+’ The preceding item will be matched one or more times. | |
| ‘{n}’ The preceding item is matched exactly n times. | |
| ‘{n,}’ The preceding item is matched n or more times. | |
| ‘{,m}’ The preceding item is matched at most m times. This is a GNU extension. | |
| ‘{n,m}’ The preceding item is matched at least n times, but not more than m times. | 
  
    
      This file contains hidden or 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
    
  
  
    
  | ‘\b’ Match the empty string at the edge of a word. | |
| ‘\B’ Match the empty string provided it’s not at the edge of a word. | |
| ‘\<’ Match the empty string at the beginning of word. | |
| ‘\>’ Match the empty string at the end of word. | |
| ‘\w’ Match word constituent, it is a synonym for ‘[_[:alnum:]]’. | |
| ‘\W’ Match non-word constituent, it is a synonym for ‘[^_[:alnum:]]’. | |
| ‘\s’ Match whitespace, it is a synonym for ‘[[:space:]]’. | |
| ‘\S’ Match non-whitespace, it is a synonym for ‘[^[:space:]]’. | 
  
    
      This file contains hidden or 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
    
  
  
    
  | su #substitute user | |
| id | |
| echo $USER | |
| su -l #full login shell | |
| cat /etc/sudoers | |
| sudo visudo | |
| ssh -l root 192.168.0.3 | |
| vi /etc/ssh/sshd_config | |
| systemctl restart sshd | 
  
    
      This file contains hidden or 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
    
  
  
    
  | \ Used to drop the special meaning of character | |
| following it (discussed below) | |
| [] Represent a character class | |
| ^ Matches the beginning | |
| $ Matches the end | |
| . Matches any character except newline | |
| ? Matches zero or one occurrence. | |
| | Means OR (Matches with any of the characters | |
| separated by it. | |
| * Any number of occurrences (including 0 occurrences) | 
  
    
      This file contains hidden or 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 | |
| TEXT_RESET='\e[0m' | |
| TEXT_YELLOW='\e[0;33m' | |
| TEXT_RED_B='\e[1;31m' | |
| sudo apt-get update | |
| echo -e $TEXT_YELLOW | |
| echo 'APT update finished...' | |
| echo -e $TEXT_RESET | 
  
    
      This file contains hidden or 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
    
  
  
    
  | sudo aptitude update | |
| echo "------------------------------------------------------------------------------------------------------------------------------------" | |
| sudo aptitude upgrade -y | |
| echo "-----------------------------------------------------------------------------------------------------------------------------------" | |
| sudo aptitude autoclean | |
| echo "-----------------------------------------------------------------------------------------------------------------------------------" | |
| sudo apt-get autoclean | |
| echo "-----------------------------------------------------------------------------------------------------------------------------------" | |
| sudo apt-get autoremove | |
| echo "-----------------------------------------------------------------------------------------------------------------------------------" | 
  
    
      This file contains hidden or 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
    
  
  
    
  | sudo apt-get update -o Dir::Etc::SourceList=/etc/apt/security.sources.list | |
| sudo apt-get upgrade -o Dir::Etc::SourceList=/etc/apt/security.sources.list | |
| sudo apt-get autoremove |