Skip to content

Instantly share code, notes, and snippets.

View sgithens's full-sized avatar

Steven Githens sgithens

View GitHub Profile
@sgithens
sgithens / cloud-drive-home-dir-buttons.json5
Created July 10, 2020 16:43
MOR-30 Cloud Drive Buttons
{
extraWidgets: [
{
id: "dropbox-homedir-button",
category: "cloud-drive-home-location",
widget: "button",
actionType: "web",
actionData: "https://www.dropbox.com/h",
@sgithens
sgithens / instructions.md
Last active April 21, 2020 20:13
Testing the full set of Captured Solutions in a vagrant VM
@sgithens
sgithens / clientCredential-query.json
Last active March 9, 2020 16:55
Client Credential Query with scrubbing of secrets field
{
"selector": {
"type": {
"$eq": "clientCredential"
}
},
"fields": [
"_id",
"_rev",
"type",
@sgithens
sgithens / launch.json5
Created January 30, 2020 18:28
Christophers gpii-app debug vscode setup
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Electron (Main)",
@sgithens
sgithens / capture.js
Created January 28, 2020 19:42
Refactor from capture tool before using lifecycleManager.processRead
/**
* Fetches all settings for a particular solution, going through all of the solutions settings handlers.
*
* @param {lifecycleManager.invokeSettingsHandlerGet} invokeSettingsHandlerGet - Invoker from the `lifecycleManager`
* necessary for extracting settings from a solution and it's spec.
* @param {Object} solution - The solution registry entry body for this solution.
* @param {String} solutionID - The dotted solution id, example `com.microsoft.windows.cursors`.
* @param {lifecycleManager.variableResolver} resolver - Resolver for looking up handler specifications
* @return {Array} An array of promises resolving to the results from each settings handler the solution uses.
*/
@sgithens
sgithens / capture.js
Last active January 27, 2020 23:14
GPII-4146 spike
fluid.each(solutionsToFetch, function (solution, solutionID) {
var newSolution = gpii.lifecycleManager.transformSolutionSettings(solution, gpii.settingsHandlers.changesToSettings);
if (solutionID === "com.freedomscientific.jaws") {
newSolution = gpii.flowManager.jawsVoiceProfileAdjustment(newSolution);
}
fluid.each(newSolution.settingsHandlers, function (handlerSpec) {
//if applicationSettings is unspecified, dont attempt to get settings
if (!handlerSpec.supportedSettings) {
@sgithens
sgithens / capturedSettingsToRender.json
Last active September 13, 2019 18:44
capturedSettingsToRender.json
[
{
"settings": {
"Languages": [
"en-US"
]
},
"name": "Windows Display Language",
"numberOfSettings": 1,
"renderSettings": {
@sgithens
sgithens / out.txt
Created July 3, 2019 19:50
Please drain this queue
Stevens-MacBook-Pro-2:lichen sgithens$ node smallCattTest.js
Infusion at path /Users/sgithens/code/lichen/node_modules/infusion is at top level
12:49:39.620: Registering module fluid-lichen from path /Users/sgithens/code/lichen/
12:49:39.621: Registering module infusion from path /Users/sgithens/code/lichen/node_modules/infusion/
12:49:39.621: Registering module infusion from path /Users/sgithens/code/lichen/node_modules/infusion
12:49:39.646: Successfully queued test Test Asynchronous Meow
Stevens-MacBook-Pro-2:lichen sgithens$
@sgithens
sgithens / editprefset-settingsTable-widget.handlebars
Created May 28, 2019 19:34
Currently not showing unsupported entries in the PPT
<tbody>
{{#with options.solution}}
{{#each this.settingsHandlers}}
{{#each this.supportedSettings}}
<tr class="pmt-settings-table-row" data-term="{{@key}}">
<td id="a-{{../../../options.appId}}-{{@key}}">{{this.schema.title}}</td>
<td><!-- Space for product default column --></td>
{{#each ../../../model.prefsSetNames}}
<td class="pmt-value-display" data-name="{{../schema.title}}" data-prefsSet="{{this}}" data-product="{{../../../../options.appUri}}" data-term="{{@../key}}"
{{#compare (lookupProductPrefValue this ../../../../options.appUri @../key) "===" undefined}}
@sgithens
sgithens / handlers.js
Created May 10, 2019 19:28
Example of logging in with gpii-express-user
var loginProm = userAPI.utils.unlockUser(req.body.username, req.body.password);
loginProm.then(function (/* data */) {
if (loginProm.value.isError) {
// return true;
res.redirect("/");
}
if (loginProm.value.roles.includes("ppt_admin")) {
req.session.loggedInToPPT = true;
req.session.perms = that.options.permissions;
res.redirect("/ppt");