For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
/** | |
* Copyright 2019 Google LLC. | |
* SPDX-License-Identifier: Apache-2.0 | |
*/ | |
function getEnvironment() { | |
var environment = { | |
spreadsheetID: "<REPLACE WITH YOUR SPREADSHEET ID>", | |
firebaseUrl: "<REPLACE WITH YOUR REALTIME DB URL>" | |
}; |
function getURLParameter(name) { | |
var val = (RegExp('[?|&]' + name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]; | |
return val ? decodeURI(val) : val; | |
} |
# NOT FOR SHELL SCRIPT, but rather just for quick copy paste | |
# this is a copy-paste version with defaults of the full shell script docker-xenial.sh which is below this one in gist. | |
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D && \ | |
mkdir -p /etc/apt/sources.list.d && \ | |
echo deb https://apt.dockerproject.org/repo ubuntu-xenial main > /etc/apt/sources.list.d/docker.list && \ | |
service lxcfs stop && apt-get remove -y -q lxc-common lxcfs lxd lxd-client && \ | |
apt-get update -q && apt-get upgrade -y -q && \ | |
apt-get install -y -q docker-engine && \ | |
mkdir -p /etc/systemd/system/docker.service.d && \ |
CREATE OR REPLACE FUNCTION notify_trigger() RETURNS trigger AS $$ | |
DECLARE | |
channel_name varchar DEFAULT (TG_TABLE_NAME || '_changes'); | |
BEGIN | |
IF TG_OP = 'INSERT' THEN | |
PERFORM pg_notify(channel_name, '{"id": "' || NEW.id || '"}'); | |
RETURN NEW; | |
END IF; | |
IF TG_OP = 'DELETE' THEN | |
PERFORM pg_notify(channel_name, '{"id": "' || OLD.id || '"}'); |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
model() { | |
let userPromise = this.store.findAll(‘user’); | |
userPromise.catch((error) => { | |
// transition to another route and show some error notification saying your team is doing their best to fix the problem | |
}); | |
return userPromise; | |
} |
import ratpack.exec.ExecController; | |
import ratpack.exec.Execution; | |
import ratpack.http.client.HttpClient; | |
import ratpack.server.RatpackServer; | |
import ratpack.service.Service; | |
import ratpack.service.StartEvent; | |
import ratpack.service.StopEvent; | |
import java.net.URI; | |
import java.util.Optional; |
// app/models/product.js | |
export default DS.Model.extend({ | |
masterVariant: DS.belongsTo('product-variant'), | |
variants: DS.hasMany('product-variant') // only contains the variants that are not master | |
}); | |
// app/models/product-variant.js | |
export default DS.Model.extend({ | |
product: DS.belongsTo('product', { inverse: null }), | |
master: DS.attr('boolean') |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |