start new:
tmux
start new with session name:
tmux new -s myname
| <?php | |
| /*********************** | |
| *@author: Ritesh Agrawal | |
| *@description: Identifies php files that contain leading or trailing spaces before or after PHP opening or closings tags | |
| *@version: 1.0 | |
| *@date: Nov 06, 2007 | |
| @todo – check only *.PHP or *.CTP files rather than checking all of the files | |
| – html based output | |
| ***********************/ | |
| //Set Source Path |
| ########## Install NGINX ############## | |
| # Install software-properties-common package to give us add-apt-repository package | |
| sudo apt-get install -y software-properties-common | |
| # Install latest nginx version from community maintained ppa | |
| sudo add-apt-repository ppa:nginx/stable | |
| # Update packages after adding ppa |
| #!/bin/bash | |
| # | |
| # This script configures WordPress file permissions based on recommendations | |
| # from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
| # | |
| # Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
| # | |
| WP_OWNER=www-data # <-- wordpress owner | |
| WP_GROUP=www-data # <-- wordpress group | |
| WP_ROOT=$1 # <-- wordpress root directory |
| add_action('amp_post_template_css','ampforwp_add_custom_css_example', 11); | |
| function ampforwp_add_custom_css_example() { ?> | |
| /* Add your custom css here */ | |
| body { | |
| background: red; | |
| } | |
| <?php | |
| } |
| <?php | |
| // add_filter( 'wpseo_enable_xml_sitemap_transient_caching', '__return_false'); | |
| /** | |
| * Create a new custom yoast seo sitemap | |
| */ | |
| add_filter( 'wpseo_sitemap_index', 'ex_add_sitemap_custom_items' ); | |
| add_action( 'init', 'init_wpseo_do_sitemap_actions' ); |
| # https://github.com/rg3/youtube-dl/ | |
| # On ubuntu: apt-get install libav-tools | |
| # Download Playlist to batch of MP3s | |
| youtube-dl -f bestvideo+bestaudio --extract-audio --audio-format mp3 --prefer-avconv --playlist-random https://www.youtube.com/playlist?list=XXXXX | |
| # Download individual song | |
| youtube-dl -f bestvideo+bestaudio --extract-audio --audio-format mp3 --prefer-avconv https://www.youtube.com/watch?v=ZZZZZZZ |
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: nginx | |
| # Required-Start: $remote_fs $syslog | |
| # Required-Stop: $remote_fs $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: nginx init.d dash script for Ubuntu or other *nix. | |
| # Description: nginx init.d dash script for Ubuntu or other *nix. | |
| ### END INIT INFO |
| user www-data; | |
| http { | |
| ## | |
| # Basic Settings | |
| ## | |
| sendfile on; | |
| tcp_nopush on; |
| <?php | |
| // NOTE: verify-purchase has been deprecated and it's best to use the new /author/sale endpoint as documented on http://build.envato.com/ | |
| // created by Envato user wpdreams https://forums.envato.com/t/verify-purchase-class/3526 | |
| // usage example: | |
| $o = EnvatoApi2::verifyPurchase( $purchase_code ); |