This file contains 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 | |
# https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-14-04 | |
# Download the Let’s Encrypt Client | |
cd /usr/local/sbin | |
sudo wget https://dl.eff.org/certbot-auto | |
sudo chmod a+x /usr/local/sbin/certbot-auto | |
# Set Up the SSL Certificate |
This file contains 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
# force HTTPS and www. | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} (?!^www\.)^(.+)$ [OR] | |
RewriteCond %{HTTPS} off | |
RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L] | |
# alternative way | |
RewriteCond %{HTTP_HOST} !^$ | |
RewriteCond %{HTTP_HOST} !^www\. [NC] |
This file contains 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
// implementation of disabled form fields | |
var nowTemp = new Date(); | |
var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0); | |
var checkin = $('#dpd1').fdatepicker({ | |
onRender: function (date) { | |
return date.valueOf() < now.valueOf() ? 'disabled' : ''; | |
} | |
}).on('changeDate', function (ev) { | |
if(ev.date){ | |
if (ev.date.valueOf() > checkout.date.valueOf()) { |