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
| server { | |
| listen 443 ssl; | |
| listen [::]:443 ssl; | |
| server_name dave.pe; | |
| ssl_certificate /etc/letsencrypt/live/dave.pe/fullchain.pem; | |
| ssl_certificate_key /etc/letsencrypt/live/dave.pe/privkey.pem; | |
| ssl_session_timeout 1d; | |
| ssl_session_cache shared:SSL:10m; |
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
| server { | |
| listen 80; ## listen for ipv4; this line is default and implied | |
| listen [::]:80; ## listen for ipv6 | |
| server_name dave.pe www.dave.pe; | |
| root /usr/share/nginx/dave.pe/html; | |
| index index.php index.html index.htm; |
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
| openssl dhparam -out /etc/nginx/dhparam.pem 2048 |
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
| ./letsencrypt-auto --server https://acme-v01.api.letsencrypt.org/directory auth -d dave.pe -d www.dave.pe |
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 service nginx stop |
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
| cd ~ | |
| git clone https://github.com/letsencrypt/letsencrypt | |
| cd letsencrypt |
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
| <?php function add_video_suffix( $title, $id = null ) { | |
| if( in_the_loop() && in_category( 'Videos', $id ) ) { | |
| $title .= ' [VIDEO]'; | |
| } | |
| return $title; | |
| } | |
| add_filter( 'the_title', 'add_video_suffix' ); |
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
| touch deploy.sh | |
| chmod 755 deploy.sh |
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
| <?php | |
| // Enable the plugin only when Jetpack and Sharedaddy are enabled | |
| function shortlinks_for_sharing_buttons() { | |
| if ( | |
| class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'get_active_modules' ) && in_array( 'sharedaddy', Jetpack::get_active_modules() ) | |
| ) { | |
| add_filter( 'sharing_permalink', 'get_shortlink_for_post' ); | |
| } |
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
| <?php /* Disable specified plugins in development environment */ | |
| if ( defined( 'WP_ENV' ) && WP_ENV == 'dev' ) { | |
| $plugins = array( | |
| 'iwp-client/init.php', | |
| 'google-analytics-for-wordpress/googleanalytics.php', | |
| ); | |
| require_once(ABSPATH . 'wp-admin/includes/plugin.php'); | |
| deactivate_plugins($plugins); |