Skip to content

Instantly share code, notes, and snippets.

View VinayaSathyanarayana's full-sized avatar

Vinaya Sathyanarayana VinayaSathyanarayana

View GitHub Profile
@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

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 / 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')
{
"_description: Name of City, or Town": {
"State": "The Indian State under which this City/Town exists.",
"GeoCode": [
"Latitude",
"Longitude"
],
"PinCodes": [
"All",
"The",
@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
#-- encoding: UTF-8
#-- copyright
# OpenProject is a project management system.
# Copyright (C) 2012-2017 the OpenProject Foundation (OPF)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
#
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
# Copyright (C) 2006-2017 Jean-Philippe Lang
@VinayaSathyanarayana
VinayaSathyanarayana / stackPrinter.js
Created September 3, 2018 12:33 — forked from ErisDS/stackPrinter.js
Print an express middleware stack
module.exports = function stackPrinter(req, res, next) {
console.log('Printing Stack For', req.url);
function printItem(item, prefix) {
prefix = prefix || '';
if (item.route) {
console.log(prefix, 'Route', item.route.path);
} else if (item.name === '<anonymous>') {
console.log(prefix, item.name, item.handle);
@VinayaSathyanarayana
VinayaSathyanarayana / bandwidth.js
Created August 8, 2018 12:53 — forked from debloper/bandwidth.js
Determine client's connection speed with JavaScript
// Let's initialize the primitives
var startTime, endTime, fileSize;
// Set up the AJAX to perform
var xhr = new XMLHttpRequest();
// Rig the call-back... THE important part
xhr.onreadystatechange = function () {
// we only need to know when the request has completed
@VinayaSathyanarayana
VinayaSathyanarayana / .eslintrc.js
Created August 6, 2018 01:32 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@VinayaSathyanarayana
VinayaSathyanarayana / payment.html
Created August 3, 2018 17:37 — forked from travist/payment.html
Form.io + Stripe Payment Processing
<div ng-controller="StipePayment">
<formio form="form" submission="submission"></formio>
</div>