Skip to content

Instantly share code, notes, and snippets.

View sgithens's full-sized avatar

Steven Githens sgithens

View GitHub Profile
fluid.defaults("gpii.adjuster.voicePitch", {
gradeNames: ["fluid.prefs.panel", "autoInit"],
preferenceMap: {
"gpii.primarySchema.voicePitch": {
"model.value": "default",
"controlValues.voicePitch.min": "minimum",
"controlValues.voicePitch.max": "maximum",
"controlValues.voicePitch.step": "divisibleBy"
}
},
@sgithens
sgithens / lgs_driver.js
Last active September 6, 2015 03:44
Moving persona config things to AppData
"use strict";
var fluid = require("universal"),
gpii = fluid.registerNamespace("gpii"),
kettle = fluid.registerNamespace("kettle"),
handlebars = require("handlebars"),
fs = require("fs-extra"),
os = require("os");
require("./index.js");
import ast
import inspect
print "Hello AST"
class WovenCommentsVisitor(ast.NodeVisitor):
def generic_visit(self, node):
if type(node) == ast.Expr and type(node.value) == ast.Str:
s = node.value.s
if s.endswith('aprfield'):
import django_filters
from ktb.core.util import MultiFieldFilter
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Submit, Div, HTML, Field
from crispy_forms.bootstrap import StrictButton
def get_filter_class(model_cls, search_fields):
"""
Takes the django model class, such as Donation or Subject, and the list of
fields (by name) that should be searched in the filter.
JAWS Setup Package Error
The JAWS setup package could not install the required component RuntimeJAWS. The process will now exit.
Product: Freedom Scientific Talking Installer 16.0 -- Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action InstallFsBrlBrailleSupport, entry: InstallFsBrlBrailleSupport, library: C:\WINDOWS\Installer\MSI3726.tmp
"type": "firstDiscovery.server.oauth2.config",
"options": {
"gradeNames": ["gpii.firstDiscovery.server.configurator"],
"preferencesConfig": {
"securityServer": {
"paths": {
"token": "/access_token",
"preferences": "/add-preferences?view=%view"
},
@sgithens
sgithens / bootstrap3-debug.html
Created July 9, 2016 23:58
Bootstrap 3 Debug
<div class="row">
<p class="visible-xs-inline-block hidden-sm hidden-md hidden-lg">Extra Small</p>
<p class="hidden-xs visible-sm-inline-block hidden-md hidden-lg">Small</p>
<p class="hidden-xs hidden-sm visible-md-inline-block hidden-lg">Medium</p>
<p class="hidden-xs hidden-sm hidden-md visible-lg-inline-block">Large</p>
</div>
@sgithens
sgithens / something.js
Created October 1, 2016 18:33
438:74 error Don't make functions within a loop no-loop-func
// We are iterating through the array of specs by creating the dashed filenames.
// e.g transformSpecRoute is ['A', 'B', 'C'] so we would look up spec files
// 'A-B' and 'B-C'
for (var i = 0; i < transformSpecRoute.length - 1; i++) {
transformSpec = gpii.ontologyHandler.getTransformSpec(that.options.ontologyTransformSpecs,
transformSpecRoute[i], transformSpecRoute[i + 1]);
if (transformSpec === undefined) {
return {};
}
// copy values directly or transform - depending on key
rules: {
contextToExpose: {
commonTerms: { literalValue: "{devpmt}.options.commonTermList" },
req: { params: "req.params", query: "req.query" },
commonTerms2: { literalValue: "{devpmt}.commonTermList2" },
// npset: { literalValue: "{devpmt}.npset" }
npset: {
"transform": {
type: "fluid.transforms.free",
func: "gpii.devpmt.npset",
@sgithens
sgithens / commonTerms.json5
Created March 22, 2017 02:51
Drafting Common Terms Metadata
{
"http://registry.gpii.net/common/fontSize": {
name: "Font Size",
description: "",
schema: {
type: "integer"
}
},
"http://registry.gpii.net/common/foregroundColor": {
name: "ForegroundColor",