I hereby claim:
- I am abrahamvegh on github.
- I am abrahamvegh (https://keybase.io/abrahamvegh) on keybase.
- I have a public key whose fingerprint is A7AA F5D7 347C D58C 296F FA46 3ABF D2D0 C39E 7551
To claim this, I am signing this object:
acl "linode" | |
{ | |
// Dallas | |
// axfr1.linode.com | |
104.237.137.10; | |
2600:3c00::a; | |
// Fremont | |
// axfr2.linode.com | |
65.19.178.10; |
#!/usr/bin/env bash | |
# unifi_ssl_import.sh | |
# UniFi Controller SSL Certificate Import Script for Unix/Linux Systems | |
# by Steve Jenkins <http://www.stevejenkins.com/> | |
# modified by Abraham Vegh <https://abrahamvegh.com> | |
# Incorporates ideas from https://source.sosdg.org/brielle/lets-encrypt-scripts | |
# Version 3.0 | |
# Last Updated October 8, 2016 |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<?php | |
namespace SDM\DB | |
{ | |
class MySQL | |
{ | |
public function __construct () | |
{ | |
echo 'MySQL->__construct()', "\n"; | |
} | |
} |
# Requirements: | |
# 1. No www. | |
# 2. Always SSL. | |
# 3. Full IPv4 and IPv6 compatibility. | |
# | |
# If you can do better than this, feel free to improve. | |
# The server in question only serves a single domain. | |
# Pesky version strings | |
server_tokens off; |
<? | |
define('HESITANT', preg_match('/^hesitant/', $_SERVER['HTTP_HOST'])); | |
function hesitant ($m, $a = NULL) { return HESITANT ? $m : (is_null($a) ? '' : $a) ; } |
<? | |
function normalize_header_name ($name) | |
{ | |
$name = substr($name, 5); | |
$name = str_replace('_', '-', $name); | |
$name = strtolower($name); | |
return $name; | |
} |
# Check certificate expiration date | |
openssl x509 -in certificate.pem -noout -enddate | |
# Create new ECC key and CSR | |
openssl ecparam -out private.key -name prime256v1 -genkey | |
chmod 400 private.key | |
openssl req -new -key private.key -out csr.txt -subj '/CN=domain.tld' | |
# Create new RSA key and CSR | |
openssl req -out csr.txt -new -newkey rsa:4096 -sha256 -nodes -keyout private.key -subj '/CN=domain.tld' > /dev/null 2>&1 |
RewriteEngine on | |
# Force No-WWW | |
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] | |
RewriteRule ^(.*)$ http://%1/$1 [R=301,L] | |
# Force HTTPS | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] |