Skip to content

Instantly share code, notes, and snippets.

Avatar

Barry TheFoot

View GitHub Profile
View vue-sweetalert2.js
// Display a vue component with bindings and return the props data
alertVue: async ( options, componentName, propsData ) => {
const ComponentClass = Vue.extend ( Vue.component ( componentName ) );
const instance = new ComponentClass (
{
propsData: propsData
}
);
View 2020-typeutils.js
/**
* This module provides native variable type checking utilities.
* It has no external dependencies.
* No parsing or coercion is performed.
*
* @module TypeUtils
*/
const validateUUID = require ( 'uuid-validate' );
// The module definition
View 2020-coding-standards-sample-es-class.js
/**
* Sample ES6 classes
*/
/** Implement private methods using symbols*/
const _braceFood = Symbol ( 'braceFood' );
// Base class
class Being {
View sample-qlab-monitor-report.json
{
"log_id": "8a459199-a2e2-4b2b-948f-a1d865643d79",
"type": "qlab.monitor",
"organisation_id": 1,
"document_list": [],
"created_by": "36cee9a0-3235-43ef-9c24-c1bc6ee8102e",
"created_at": "2017-07-28T12:36:19.670Z",
"updated_by": "36cee9a0-3235-43ef-9c24-c1bc6ee8102e",
"updated_at": "2017-07-28T12:36:19.670Z",
"metadata": {
View all_tags.json
[{"tagId":1047,"organisationId":101,"tagName":"aggregatePrincipalAmount","tagType":1,"latestVersion":3,"_options":{"preview":"CUR 123.45","groups":[{"label":"Format","controls":[{"type":"radio","id":"format","options":[{"value":"currency","text":"Currency + absolute amount"},{"value":"absolute","text":"Absolute amount"}]}]},{"label":"Decimals","controls":[{"type":"select","id":"decimals","options":[{"value":"default","text":"Actual"},{"value":"0","text":"0"},{"value":"1","text":"1"},{"value":"2","text":"2"},{"value":"2+","text":"2+"},{"value":"2-3","text":"2-3"},{"value":"2-4","text":"2-4"},{"value":"2-5","text":"2-5"},{"value":"2-6","text":"2-6"},{"value":"2-7","text":"2-7"},{"value":"3","text":"3"},{"value":"4","text":"4"},{"value":"5","text":"5"},{"value":"6","text":"6"},{"value":"6","text":"7"}]}]}],"language":"EN","text":"aggregate principal amount","tagId":1047}},{"tagId":1071,"organisationId":101,"tagName":"barrierBreached","tagType":2,"latestVersion":1,"_options":{"language":"EN","text":"Barrier breac
@TheFoot
TheFoot / tokendata_for_logic_condition.json
Last active Sep 4, 2015
Proposed structure for a logic condition object. Organising languages by using a keyed collection is easier to traverse and use than an indexed array of objects.
View tokendata_for_logic_condition.json
{
"EN": {
"text": "Barrier breached",
"items": [
{
"value": "yes",
"text": "Yes"
},
{
"value": "no",
@TheFoot
TheFoot / js-disable-copy-paste.js
Created Oct 24, 2013
Disable copy/paste in javascript
View js-disable-copy-paste.js
$(document).ready(function(){
$('#txtInput').bind("cut copy paste",function(e) {
e.preventDefault();
});
});