Skip to content

Instantly share code, notes, and snippets.

View blarfoon's full-sized avatar
💻
Coding

Davide blarfoon

💻
Coding
View GitHub Profile
@blarfoon
blarfoon / install-cf-gae-ssl.md
Created November 17, 2021 04:10 — forked from patmigliaccio/install-cf-gae-ssl.md
Configuring Cloudflare SSL/TLS certificates on Google App Engine

Configuring Cloudflare SSL/TLS on Google App Engine

Implementing end-to-end HTTPS encryption with CloudFlare for Google App Engine applications.

Google App Engine - Custom Domains

Add Domains

Register the root domain with Google Cloud Platform at the following:

// Object Literal
const myObject = {
hi: "mom",
};
// Object constructor
const myObject = new Object({
hi: "mom",
});
const myObject = {};
const doSomething = function (whatever) {
whatever.hi = "mom";
};
console.log(myObject); // > {}
doSomething(myObject);
const myObject = {
hi: "mom",
someone: {
else: "red",
},
};
function doSomething(whatever) {
whatever.hi = "medium";
whatever.someone.else = "blue";
const myObject = {
hi: "mom",
changeHi() {
this.hi = "medium";
},
something: undefined,
};
console.log(myObject); // > {hi: "mom", something: undefined, changeHi: ƒ}
function clone(src) {
const ret = src instanceof Array ? [] : {};
for (const key in src) {
if (!src.hasOwnProperty(key)) {
continue;
}
let val = src[key];
if (val && typeof val == "object") {
val = clone(val);
}
function myFunc() {
console.log("hi", myFunc.who);
}
myFunc.who = "mom";
myFunc(); // > hi mom
const myFirstObj = {};
const mySecondObj = {};
console.log(myFirstObj == mySecondObj, myFirstObj === mySecondObj); // > false false
function areEqualShallow(a, b) {
for (const key in a) {
if (!(key in b) || a[key] !== b[key]) {
return false;
}
}
for (const key in b) {
if (!(key in a) || a[key] !== b[key]) {
return false;
}
function areEqualDeep(a, b) {
if (typeof a == "object" && a != null && typeof b == "object" && b != null) {
const count = [0, 0];
for (const key in a) count[0]++;
for (const key in b) count[1]++;
if (count[0] - count[1] != 0) {
return false;
}
for (const key in a) {
if (!(key in b) || !areEqualDeep(a[key], b[key])) {