Skip to content

Instantly share code, notes, and snippets.

server {
include fastcgi_params;
fastcgi_param MAIN_SITE_NAME domain.com;
set $main_site_name "domain.com";
fastcgi_param HTTPS on;
listen *:443 ssl http2;
server_name domain.com;
root /data/disk/o1/static/grav-site-domain-com;
ssl on;
@atoponce
atoponce / gist:07d8d4c833873be2f68c34f9afc5a78a
Last active July 26, 2024 09:10 — forked from tqbf/gist:be58d2d39690c3b366ad
Cryptographic Best Practices

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@laradevitt
laradevitt / d8module.install
Last active June 17, 2023 14:17
(Drupal 8) Create a table in a database other than the default during module installation. Database must already be specified in settings.php.
<?php
/**
* @file
* Install, update and uninstall functions for the d8module module.
*/
function d8module_schema_otherdb() {
$schema['mytable'] = array(
'description' => 'My table description',
#######################################################
### nginx compact basic configuration start
#######################################################
###
### deny crawlers and bots without 403 response
###
if ($http_user_agent ~* (HTTrack|HTMLParser|libwww|wget|AutomaticSiteMap|bot) ) {
return 444;
}
#######################################################
### nginx.conf site wp vhost include start
#######################################################
###
### deny crawlers without 403 response
###
if ($http_user_agent ~* (HTTrack|HTMLParser|libwww|wget) ) {
return 444;
}