Skip to content

Instantly share code, notes, and snippets.

View amb26's full-sized avatar

Antranig Basman amb26

View GitHub Profile

Introduction

This page describes how to set up an environment that can run the backend online services that GPII generally depend on in production mode. These are preferences server and cloud based flowmanager.

The setup will be using Vagrant and Virtual Box to set up a machine with CentOS 7.0.

The document contain the following parts:

  • The first part describes how to create and spin up a CentOS virtual machine and installing the dependencies (node, npm, git).
  • Next is a section describing how to install couchDB and initialize, which is used when running the preferences server in production mode.
  • Then a very brief description on installing the GPII and dependencies
@amb26
amb26 / privacy-flat.json
Created December 15, 2014 17:34
privacy-flat
{
"http://registry\\.gpii\\.net/common/highContrastEnabled": "change-contrast",
"http://registry\\.gpii\\.net/common/fontSize": "increase-size.appearance.text-size",
"http://registry\\.gpii\\.net/common/cursorSize": "increase-size.appearance.cursor-size",
"http://registry\\.gpii\\.net/common/magnifierEnabled": "increase-size.magnifier", // problem here
"http://registry\\.gpii\\.net/common/magnification": "increase-size.magnifier.magnification-level",
"http://registry\\.gpii\\.net/common/magnifierPosition": "increase-size.magnifier.magnifier-position",
"http://registry\\.gpii\\.net/common/volume": "universal-volume",

This directory contains configuration and driver files for the EASIT4ALL OAuth 2 integration demonstration. The initial datastore for the OAuth authorization server is held in EasitTestOauthDatastore.js. To start up the cloud-based flow manager secured by these records, simply type

node driver.js

from this directory. The endpoints exposed will be the ones as documented in http://wiki.gpii.net/w/GPII_OAuth_2_Guide - e.g. localhost:8081/settings holding the OAauth2-secured settings for the authenticated user.

@amb26
amb26 / gist:a6ed9286a659a7f7faf5
Created January 9, 2015 18:32
MatchMaker filter chain priorities
// This is a table of priorities for handlers in the "processMatch" filter chain governing the MatchMaking process.
// This will be removed in favour of a relative constraints system once we have FLUID-5506 completed
// Higher priority numbers are handled earlier than lower ones
// This process is kicked off by the "onReadyToMatch" event defined in the "gpii.request.flowManager.matchMakingRequest" grade
gpii.request.flowManager.processMatch.priorities = {
// onReadyToMatch event starts
preProcess: 100,
matchMakerDispatcher: 90,
// onMatch event fired
runContextManager: 80,
@amb26
amb26 / gist:5fcc3816dbd103bdb45d
Created January 13, 2015 20:34
FLUID-5585 initial fix
diff --git a/src/framework/core/js/DataBinding.js b/src/framework/core/js/DataBinding.js
index 099de91..9c84cb5 100644
--- a/src/framework/core/js/DataBinding.js
+++ b/src/framework/core/js/DataBinding.js
@@ -359,8 +359,13 @@ var fluid_2_0 = fluid_2_0 || {};
fluid.transformToAdapter = function (transform, targetPath) {
var basedTransform = {};
- basedTransform[targetPath] = transform;
- return function (trans, newValue /*, sourceSegs, targetSegs */) {
@amb26
amb26 / gist:38cf42a2c57224c01a1c
Created January 28, 2015 19:47
FLUID-5517 test case demonstrating FLOE-230 failure
// FLUID-5517: Failure to batch compound updates properly - example from metadata feedback
fluid.defaults("fluid.tests.fluid5517root", {
gradeNames: ["fluid.standardRelayComponent", "autoInit"],
model: {
userData: {
opinion: {
mismatch: true
}
},
@amb26
amb26 / FluidViewDebugging.js
Created February 13, 2015 02:27
And so it begins
/*
Copyright 2015 Lucendo Development Ltd.
Licensed under the Educational Community License (ECL), Version 2.0 or the New
BSD license. You may not use this file except in compliance with one these
Licenses.
You may obtain a copy of the ECL 2.0 License and BSD License at
https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
*/
@amb26
amb26 / gist:7351f5ceeebe2aa4ef85
Created February 13, 2015 20:59
FLUID-5495 test
/** FLUID-5495 tests - distribute upwards, use of "/" context, global instantiator, and proper deregistration - "new demands blocks" **/
fluid.defaults("fluid.tests.fluid5495distributor", {
gradeNames: ["fluid.littleComponent", "autoInit"],
distributeOptions: {
record: "distributedValue",
target: "{/ fluid.tests.fluid5495target}.options.targetValue"
}
});
/** FLUID-5495 tests - distribute upwards, use of "/" context, global instantiator, and proper deregistration - "new demands blocks" **/
fluid.defaults("fluid.tests.fluid5495rootDistributor", {
gradeNames: ["fluid.littleComponent", "autoInit"],
distributeOptions: {
record: "distributedValue",
target: "{/ fluid.tests.fluid5495target}.options.targetValue"
}
});
@amb26
amb26 / traceIt.js
Created March 13, 2015 16:57
V8 Optimisation status tracing for EL parsing functions
function printStatus(fn) {
switch(%GetOptimizationStatus(fn)) {
case 1: console.log("Function is optimized"); break;
case 2: console.log("Function is not optimized"); break;
case 3: console.log("Function is always optimized"); break;
case 4: console.log("Function is never optimized"); break;
case 6: console.log("Function is maybe deoptimized"); break;
}
}