This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
# Configuration options are limited to SSL/TLS | |
# Enable SSL session caching for improving performance by avoiding the costly session negotiation process where possible | |
# SSL Labs doesn't assume that SNI is available to the client, so it only tests the default virtual server | |
# setting this globally to make it work across all the nginx virtual servers (including the default virtual server) | |
ssl_session_cache shared:ssl_session_cache:10m; | |
ssl_session_timeout 10m; | |
server { | |
listen 443 ssl; |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
@echo off | |
set /p domain="Enter Domain: " | |
set OPENSSL_CONF=../conf/openssl.cnf | |
if not exist .\%domain% mkdir .\%domain% | |
..\bin\openssl req -config cert.conf -new -sha256 -newkey rsa:2048 -nodes -keyout %domain%\server.key -x509 -days 3650 -out %domain%\server.crt | |
echo. | |
echo ----- |
[ req ] | |
default_bits = 2048 | |
default_keyfile = server-key.pem | |
distinguished_name = subject | |
req_extensions = req_ext | |
x509_extensions = x509_ext | |
string_mask = utf8only | |
[ subject ] |
The goal of this cheatsheet is to make it easy to add hand-rolled authentication to any rails app in a series of layers.
First the simplest/core layers, then optional layers depending on which features/functionality you want.
Specs |
|
---|---|
AUTHOR | Ira Herman |
LANGUAGE/STACK | Ruby on Rails Version 4, 5, or 6 |
# Block Skype ads | |
127.0.0.1 *.msads.net | |
127.0.0.1 *.msecn.net | |
127.0.0.1 *.rad.msn.com | |
127.0.0.1 a.ads2.msads.net | |
127.0.0.1 ac3.msn.com | |
127.0.0.1 ad.doubleclick.net | |
127.0.0.1 adnexus.net | |
127.0.0.1 adnxs.com | |
127.0.0.1 ads1.msn.com |
# Composer | |
vendor | |
composer.phar | |
# IntelliJ - PhpStorm and PyCharm | |
.idea | |
*.ipr | |
*.iws | |
# Eclipse |
#!/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 |