Skip to content

Instantly share code, notes, and snippets.

View jordan112's full-sized avatar

Shane Jordan jordan112

  • shanejordan.com
  • MI
View GitHub Profile
/* eslint-disable max-len */
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
// Indicates whether the coverage information should be collected while executing the test
collectCoverage: false,
// An array of glob patterns indicating a set of files for which coverage information should be collected
import fetch from 'node-fetch';
const https = require('https');
const httpsAgent = new https.Agent({
keepAlive: true,
});
export const fetch_retry = async (
url: string,
options: any = null,
@jordan112
jordan112 / ZingTree_EmbeddedCrmWebResource.html
Created September 26, 2018 23:45
Html page to contain the Zing Tree iFrame and allow merge variables to be passed in and then capture custom variables when its complete
<script>
// generate a unique guid to use with the session id
function guid() {
function s4() {
return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
}
return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
}
.radio {
color: red;
}
using Microsoft.Azure.ServiceBus;
using Microsoft.ServiceBus;
using System;
using System.Text;
using System.Threading.Tasks;
namespace Amway.ServiceBus.MessageSendTester
{
class Program
{
@jordan112
jordan112 / ClientDataService.ts
Created July 12, 2017 12:56
ClientDataService to abstract away local, session or cookie fallback
import { Injectable } from '@angular/core';
import { CookieService } from 'ngx-cookie';
declare let Modernizr: any;
@Injectable()
export class ClientDataService {
private KEY_PREFIX = 'prodreg';
private KEY_SEPARATOR = '|';
private storage = null;
function getList(parms) {
var defaultParams = { endpoint: '', params: {}, doCache: true, doLog: true, capitalizeIdString: false, firstLetterCapitalize: true, api: restangular };
parms = _.extend(defaultParams, parms);
return baseService.getList(endpoint, _utils.getParsedODataFilter(parms.params, parms.capitalizeIdString, parms.firstLetterCapitalize), parms.doCache, parms.doLog, parms.api);
}
public IQueryable<CoursesBySectionViewModel> GetCoursesBySection()
{
return from cs in this.courseSectionRepository.GetAll()
join staffmem in staffRepository.GetAll() on cs.CourseSectionID equals staffmem.CourseSectionID
select new CoursesBySectionViewModel
{
AcademicYearId = cs.AcademicYearID,
SchoolId = cs.SchoolID,
CourseSectionId = cs.CourseSectionID,
@mixin locked-width-column($width) {
width: $width;
min-width: $width;
max-width: $width;
}
/* usage example */
.td { @include locked-width-column(4em); }
namespace NHA.App.Module.Attendance.Api.Infrastructure
{
using System.Reflection;
using Autofac;
using Autofac.Integration.WebApi;
using NHA.App.Module.Attendance.Contract.Repositories;
using NHA.App.Module.Attendance.Contract.Services;
using NHA.App.Module.Attendance.Repository;