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
    
  
  
    
  | wget --mirror --convert-links --adjust-extension --page-requisites --no-parent http://domain.com/ | 
  
    
      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
    
  
  
    
  | SELECT table_schema "DB Name", | |
| ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" | |
| FROM information_schema.tables | |
| where table_schema='REPLACE_WITH_DATABASE_NAME' | |
| GROUP BY table_schema; | 
  
    
      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
    
  
  
    
  | JPEGS | |
| find uploads/ -type f -iname '*.jpg' -exec jpegoptim --strip-all {} + | |
| PNG | |
| find uploads/ -iname "*.png" -exec pngquant --force --quality=40-100 --skip-if-larger --strip --verbose \{} --output \{} \; | 
  
    
      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
    
  
  
    
  | rsync -ravzv -e ssh [email protected]:/home/user/test/* --include=".*" /home/user/test | 
  
    
      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
    
  
  
    
  | =-+=-+=-+=-+=-+=-+=-+=-+=-+= | |
| List all IP's hitting any domain | |
| =-+=-+=-+=-+=-+=-+=-+=-+=-+= | |
| less /home/*/access-logs/* | awk '{print $1}' | sort | uniq -c | sort -n | |
| =-+=-+=-+=-+=-+=-+=-+=-+=-+= | |
| List all IP's hitting POSTING to any domain | |
| =-+=-+=-+=-+=-+=-+=-+=-+=-+= | 
  
    
      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
    
  
  
    
  | add_action( 'gform_after_submission', 'site_gform_after_submission', 10, 2 ); | |
| function site_gform_after_submission ( $entry, $form ) { | |
| GFAPI::delete_entry( $entry['id'] ); | |
| } | 
  
    
      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
    
  
  
    
  | # add this to your .bash_profile | |
| export PATH=$PATH:$HOME/bin | |
| _complete_ssh_hosts () | |
| { | |
| COMPREPLY=() | |
| cur="${COMP_WORDS[COMP_CWORD]}" | |
| comp_ssh_hosts=`cat ~/.ssh/known_hosts | \ | |
| cut -f 1 -d ' ' | \ | 
  
    
      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
    
  
  
    
  | _complete_ssh_hosts () | |
| { | |
| COMPREPLY=() | |
| cur="${COMP_WORDS[COMP_CWORD]}" | |
| comp_ssh_hosts=`cat ~/.ssh/known_hosts | \ | |
| cut -f 1 -d ' ' | \ | |
| sed -e s/,.*//g | \ | |
| grep -v ^# | \ | |
| uniq | \ | |
| grep -v "\[" ; | 
  
    
      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
    
  
  
    
  | tar -czvf filename.tar.gz /full/path/to/directory --exclude "/full/path/to/directory/to/exclude/wp-content/uploads" | |
| Use this on local /wp-content/uploads: | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteRule (.*) http://domain.com/wp-content/uploads/$1 | |
| </IfModule> | 
  
    
      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
    
  
  
    
  | find . -type d -exec chmod 0755 {} \; && find . -type f -exec chmod 0644 {} \; | 
NewerOlder