Skip to content

Instantly share code, notes, and snippets.

View theukedge's full-sized avatar

Dave Clements theukedge

View GitHub Profile
touch deploy.sh
chmod 755 deploy.sh
<?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' );
<?php // IN THE SPOTLIGHT TRANSIENTS
function hpc_delete_its_transients() {
global $post;
if( $post->post_type == 'spotlight' ) {
delete_transient( 'its_query' );
}
}
add_action( 'save_post', 'hpc_delete_its_transients' );
cd ~
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
sudo service nginx stop
./letsencrypt-auto --server https://acme-v01.api.letsencrypt.org/directory auth -d dave.pe -d www.dave.pe
openssl dhparam -out /etc/nginx/dhparam.pem 2048
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;
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;
service nginx -s reload