Skip to content

Instantly share code, notes, and snippets.

View VinayaSathyanarayana's full-sized avatar

Vinaya Sathyanarayana VinayaSathyanarayana

View GitHub Profile
@VinayaSathyanarayana
VinayaSathyanarayana / server.js
Created January 9, 2019 11:56 — forked from pulkitsinghal/server.js
Loopback Logging - intercept all HTTP responses, regardless of which middleware/route produced it
// Title:
// Loopback Logging - intercept all HTTP responses,
// regardless of which middleware/route produced it
// References:
// https://apidocs.strongloop.com/loopback/#app-middleware
// https://apidocs.strongloop.com/loopback/#app-middlewarefromconfig
// https://apidocs.strongloop.com/loopback/#app-definemiddlewarephases
//Sample # 1 - super simple
{
"_description: Name of City, or Town": {
"State": "The Indian State under which this City/Town exists.",
"GeoCode": [
"Latitude",
"Longitude"
],
"PinCodes": [
"All",
"The",
@VinayaSathyanarayana
VinayaSathyanarayana / Keystone 5 - Secure Cookies and Reverse Proxies.md
Created April 11, 2020 04:35 — forked from molomby/Keystone 5 - Secure Cookies and Reverse Proxies.md
Background and instructions for fixing cookie issues encountered when deploying Keystone 5 apps behind a reverse proxy (like nginx)

Keystone 5: Secure Cookies and Reverse Proxies

Can't sign in, eh?

TL;DR

When...

  • Keystone sessions are being used (eg. for authentication)
  • secureCookies Keystone config is true (the default when NODE_ENV is 'production')

Status

This extension was developed as part of the jsonapi module for Drupal.

Introduction

The JSON API specification is agnostic about how a server implements filtering strategies. In fact, the spec says:

Note: JSON API is agnostic about the strategies supported by a server. The filter query parameter can be used as the basis for any number of filtering strategies.

@VinayaSathyanarayana
VinayaSathyanarayana / MathSON.md
Created November 16, 2021 16:47 — forked from laughinghan/MathSON.md
MathSON - JSON for Math Formulae

MathSON

Status: Draft 1 In Progress. This document is undergoing its first revision. Initial implementation has begun alongside editing Draft 1. Your feedback is hoped and dreamed of.

Mathematical Structured Object Notation is a JSON-based representation for most of the common subset of what LaTeX and Presentation MathML can