Certificate Authority (CA) Server | Host Server(s) | Client(s) |
---|---|---|
Host Server Certificate Configuration | ||
This is the server typically managed by a security team. The root CA private keys are held on this server and should be protected. If these keys are compromised it will be necessary to Revoke & Rotate/Recreate ALL Certificates!! | These are the servers that are being built or reprovisioned. The Host CA Signed Certificate is used to prove Host Authenticity to clients. It is sent to the ssh client during the initial handshake when a ssh client attempts to login. | The user laptop or server that's runing the ssh client. The Client CA Signed Certificate is used to prove Client Authenticity to the Host Server |
Step 1. Create HOST CA signing keys : Example ssh-keygen -t rsa -N '' -C HOST-CA -b 4096 -f host-ca |
Step 2. Let's generate a fresh set of ssh RSA HOST keys with 4096 bits. Typically the keys are generated by default |
{ | |
// Disable admin for test | |
"admin": { | |
"disabled": true | |
}, | |
"apps": { | |
"http": { | |
// Use http to avoid having to provision an ssl cert | |
"http_port": 4444, | |
"servers": { |
############################################################################ | |
# # | |
# ------- Useful Docker Aliases -------- # | |
# # | |
# # Installation : # | |
# copy/paste these lines into your .bashrc or .zshrc file or just # | |
# type the following in your current shell to try it out: # | |
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash | |
# # | |
# # Usage: # |
<?php | |
/** | |
* Recursive builder pattern | |
* | |
* Usage: | |
* $tree = \Tree\Builder::init() | |
* ->setName('parent') | |
* ->addChild() |
Translations: Korean (by Yongwoo Lee)
Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.
I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).
add_filter('upload_dir', 'cdn_upload_url');
function cdn_upload_url($args)
{
$args['baseurl'] = 'https://your.awesomecdn.net/wp-content/uploads'; //Change to your base CDN directory - no trailing slash
return $args;
}
<?php | |
/* This sets the $time variable to the current hour in the 24 hour clock format */ | |
$time = date("H"); | |
/* Set the $timezone variable to become the current timezone */ | |
$timezone = date("e"); | |
/* If the time is less than 1200 hours, show good morning */ | |
if ($time < "12") { | |
echo "Good morning"; | |
} else | |
/* If the time is grater than or equal to 1200 hours, but less than 1700 hours, so good afternoon */ |
function getGreetingTime (m) { | |
var g = null; //return g | |
if(!m || !m.isValid()) { return; } //if we can't find a valid or filled moment, we return. | |
var split_afternoon = 12 //24hr time to split the afternoon | |
var split_evening = 17 //24hr time to split the evening | |
var currentHour = parseFloat(m.format("HH")); | |
if(currentHour >= split_afternoon && currentHour <= split_evening) { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.