Skip to content

Instantly share code, notes, and snippets.

View iamtracy's full-sized avatar
🎩
m'codebase

Tracy Lee iamtracy

🎩
m'codebase
  • Bad
  • Chicago, Il
View GitHub Profile
overwrite: true
schema:
- https://apidev.paro.io/v2/graphql:
headers:
parotoken: Bearer YOUR_TOKEN_HERE
documents: './src/app/**/*.graphql'
generates:
src/app/graphql.ts:
plugins:
- 'typescript-common'
type ElSearchQuery = {
query: {
bool: {
should: Array<MultiMatch>
filter: [
{
term: {
serviceLine: string
}
}
/*************
clientProjects = [
{
estHoursHigh: 30,
projectedHours: 27,
estHoursLow: 20,
currentHoursBilled: 24,
serviceType: "premium",
canEditDueDate: false,
"use strict";
document.addEventListener('DOMContentLoaded', Init);
function Init() {
var oForm = document.forms[0],
countryElem = oForm[config.countryUdf],
stateElem = oForm[config.stateUdf].parentElement.parentElement,
provinceElem = oForm[config.provinceUdf].parentElement.parentElement;
provinceElem.style.display = 'none';
var oPhoneField = document.getElementsByName('Phone')[0]; //get Phone input element
var oErrorMessage = document.createElement('p'); //create paragraph that will contain the error message
var cHasDuplicates = /^\D*(\d)(?:\D*|\1)*$/; //regex for later use
oErrorMessage.classList = 'error-message'; //give error message paragraph class for optional styling via customCSS
//Conditional Error Messages
var cMessages = {
charLength: 'Phone number must contain 3 to 32 characters',
charContent: 'Phone number cannot contain a comma, period, or semicolon',
charRepeated: 'Phone number cannot contain the same digits. ie "1111111111" is not an acceptable number',
//req url - https://vts.inxpo.com/scripts/Server.nxp?LASCmd=AI:1;F:LBSEXPORT!JSON&SQLID=16010&ImageLib=9
//Filter Polyfill for IE
if (!Array.prototype.filter) {
Array.prototype.filter = function(fun) {
var len = this.length >>> 0;
if (typeof fun != "function")
throw new TypeError();
var res = [];
var thisp = arguments[1];
'use strict';
document.addEventListener('DOMContentLoaded', login);
function login() {
var oElem = document.getElementById('ItemList');
var oLoginDiv = document.createElement('div');
oLoginDiv.style.marginBottom = '20px';
var oLoginLink = document.createElement('a');
GameObject("Trivia").Extend({
initGame: function(iGameKey) {
var oGame = GameDataObject("Game" + iGameKey);
oGame.Extend({
GameQuestions: [],
GetRandomQuestions: function() {
var aQuestions = [],
aTemp = [];
xDOM.cloneObject(aQuestions, this.GameQuestions.sort((function() {
return function(a, b) {
//Polyfills and Dependencies
(function() {
//https://osric.com/chris/accidental-developer/2009/08/javascript-insertafter/
Object.prototype.insertAfter = function(newNode) {
this.parentNode.insertBefore(newNode, this.nextSibling);
}
// Production steps of ECMA-262, Edition 5, 15.4.4.19
// Reference: http://es5.github.io/#x15.4.4.19