Skip to content

Instantly share code, notes, and snippets.

View jmosul's full-sized avatar

James jmosul

View GitHub Profile
<?php
use DesignMyNight\Collins\Services\PreorderManager;
if(!defined('ABSPATH')) {
require_once('/srv/core/current/site-config.php');
require_once('/srv/core/current/includes/solr-php/Service.php');
}
global $mongo, $mongoDB, $user, $request, $site;
Time Priority Description
14/06/2019 07:22:35 Warning! RCS Partial Service;CM-MAC=48:d3:43:74:65:1b;CMTS-MAC=00:01:5c:73:86:bc;CM-QOS=1.1;CM-VER=3.0;
14/06/2019 07:33:51 critical SYNC Timing Synchronization failure - Loss of Sync;CM-MAC=48:d3:43:74:65:1b;CMTS-MAC=00:01:5c:73:86:bc;CM-QOS=1.1;CM-VER=3.0;
14/06/2019 07:33:51 Warning! RCS Partial Service;CM-MAC=48:d3:43:74:65:1b;CMTS-MAC=00:01:5c:73:86:bc;CM-QOS=1.1;CM-VER=3.0;
14/06/2019 18:54:33 Error DHCP RENEW sent - No response for IPv4;CM-MAC=48:d3:43:74:65:1b;CMTS-MAC=00:01:5c:73:86:bc;CM-QOS=1.1;CM-VER=3.0;
15/06/2019 00:59:9 Warning! RCS Partial Service;CM-MAC=48:d3:43:74:65:1b;CMTS-MAC=00:01:5c:73:86:bc;CM-QOS=1.1;CM-VER=3.0;
15/06/2019 01:45:1 Error DHCP RENEW sent - No response for IPv4;CM-MAC=48:d3:43:74:65:1b;CMTS-MAC=00:01:5c:73:86:bc;CM-QOS=1.1;CM-VER=3.0;
15/06/2019 08:35:33 Error DHCP REBIND WARNING - Field invalid in response;CM-MAC=48:d3:43:74:65:1b;CMTS-MAC=00:01:5c:73:86:bc;CM-QOS=1.1;CM-VER=3.0;
15/06/2019 17:12:35 critical
@jmosul
jmosul / SimpleVueServiceProvider.js
Last active September 26, 2023 01:04
A simple (singleton) service provider for VueJS
class ServiceProvider {
constructor(services) {
this._services = services;
// use proxy to create a "magic getter" that will search the _services for a matching name
// then call "_makeOnce" to instantiate or return the singleton
return new Proxy(this, {
get: (provider, service) => {
service = service.charAt(0).toUpperCase() + service.slice(1);
@jmosul
jmosul / JadeConfig.js
Last active October 1, 2017 18:04
ES6 class for supporting Urls in my applications that talk to my api
const JadeConfig = {
environment: 'prod',
domain: 'jamesmosullivan',
topLevelDomain: 'uk'
};
@jmosul
jmosul / TextTableCreator.php
Last active May 26, 2017 16:23
Creates a text based table for printing out simple arrays. Extended version at http://github.com/jmosul/TableCreator
<?php
/**
* Class TextTableCreator
*
* Creates a text based table for printing out simple arrays
*
* CONVERTS:
*
* $table = new TextTableCreator();
@jmosul
jmosul / inCollection.js
Created August 12, 2016 08:27
Filter that filters whether an object does/doesn't appear in another array (uses underscore.js)
'use strict';
angular.module('dmn.filters.inCollection', [])
/*
* Filters an array of objects (collection) against another collection.
*
* @param compareCollection the collection to compare against
* @param compareField the field in both collections to compare
* @param filterOnIsIn Boolean of whether to filter against 'in collection' TRUE, 'not in collection' FALSE. Defaults to TRUE (is in collection)