Skip to content

Instantly share code, notes, and snippets.

View hutch120's full-sized avatar

Simon Hutchison hutch120

View GitHub Profile
'use strict'
/**
* Test Adapter
*/
// A (Adapter)-> TestAdapter function is implemented in order to follow the standard Adapter pattern
function TestAdapter(optionalGlobals) {
/**
* Handle some request
@hutch120
hutch120 / pdfmake-tsiegleauq.min.js
Created August 24, 2016 01:48
Minified pdfmake from tsiegleauq updates
!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){(function(b){a.exports=b.pdfMake=c(1)}).call(b,function(){return this}())},function(a,b,c){(function(b){"use strict";function d(a,b,c){this.docDefinition=a,this.fonts=b||h,this.vfs=c}var e=c(6),f=c(105),g=f.saveAs,h={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-Italic.ttf"}};d.prototype._createDoc=function(a,c){var d=new e(this.fonts);d.fs.bindFS(this.vfs);var f,g=d.createPdfKitDocument(this.docDefinition,a),h=[];g.on("data",function(a){h.push(a)}),g.on("end",function(){f=b.concat(h),c(f,g._pdfMakePages)}),g.end()},d.prototype._getPages=function(a,b){if(!b)throw"getBuffer is an async method and needs a callback argument";this._createDoc(a,function(a,c){b(c)})},d.prototype.open=function(a){var b=window.open("","_blank");try{this.getDat
@hutch120
hutch120 / pdfmake.tsiegleauq.vfs_fonts.min.js
Created August 24, 2016 01:45
Combined PDFMake and VFS_fonts and minified
This file has been truncated, but you can view the full file.
!function(a){function c(d){if(b[d])return b[d].exports;var e=b[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,c),e.loaded=!0,e.exports}var b={};return c.m=a,c.c=b,c.p="",c(0)}([function(a,b,c){(function(b){a.exports=b.pdfMake=c(1)}).call(b,function(){return this}())},function(a,b,c){(function(b){"use strict";function h(a,b,c){this.docDefinition=a,this.fonts=b||g,this.vfs=c}var d=c(6),e=c(105),f=e.saveAs,g={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-Italic.ttf"}};h.prototype._createDoc=function(a,c){var e=new d(this.fonts);e.fs.bindFS(this.vfs);var h,f=e.createPdfKitDocument(this.docDefinition,a),g=[];f.on("data",function(a){g.push(a)}),f.on("end",function(){h=b.concat(g),c(h,f._pdfMakePages)}),f.end()},h.prototype._getPages=function(a,b){if(!b)throw"getBuffer is an async method and needs a callback argument";this._createDoc(a,function(a,c){b(c)})},h.prototype.open=function(a){var b=window.open("","_blank");try{this.getDat
@hutch120
hutch120 / SaveAsCSV.vbs
Last active July 18, 2020 23:43
Save Excel worksheet as CSV
'
' This VBS script opens an MS Excel Workbook, sets the active sheet, and saves that sheet to CSV.
'
' Usage:
' cscript //nologo saveascsv.vbs "source.xls" "worksheetname" "output.csv"
' cscript //nologo saveascsv.vbs "c:\temp\SaveAsCSV\Book1.xlsx" "Sheet2" "c:\temp\SaveAsCSV\output.csv"
'
if WScript.Arguments.Count < 3 Then
' One WScript.Echo in case user doesnt put cscript //nologo and would otherwise have to press enter a bunch of times.
WScript.Echo "Usage:" & vbCRLF & _
{
"template": {
"layername": "DataGovAu",
"overrides": {
"title": "Libraries",
"group": "Cultural Centres",
"style": {
"src": "img/font-awesome/white/book.svg",
"bubbleBackground": "#BCA9F5"
},