Skip to content

Instantly share code, notes, and snippets.

View brucemcpherson's full-sized avatar

bruce mcpherson brucemcpherson

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<gexf version="1.2" xmlns="http://www.gexf.net/1.2draft" xmlns:viz="http:///www.gexf.net/1.1draft/viz">
<meta>
<title>potato.graphml</title>
</meta>
<graph defaultedgetype="directed">
<attributes class="node">
<attribute id="id-alias" title="id-alias" type="string"/>
<attribute id="Label" title="Label" type="string"/>
<attribute id="name" title="name" type="string"/>
initial
initial
@brucemcpherson
brucemcpherson / 0d8966d54a43723ccb464492879ef94961e1d35c
Last active March 13, 2024 15:47
filename:appsscript extension:.json
This file has been truncated, but you can view the full file.
N4IgbghgNgrgpiAXKAzgCwgDxUg2qjJEAZgGMAzARgBMAmAFgHZrjbGAGJ490gI0bgA2euQgBOShEr0AHOwgQArLVER2IADQgAltSJkqdJizadG3PgOGiJU2fKUqF6rQCc4ABwD2AMRhQoADkIAFsERBAAcy8vSKg4AHcvVwBrFA8IUjgAeggPDxQAWhRSV20PABdi0I94nC1SLwA7CrgWpFAK7TCALWbwkABBMLLSCGzAxIB9AE1klM0Qak825abSbTgcZABfLThMLMrtZoAZWMjtJsiiAGUAFUGAYQBpABEAJQBJADUAUQ+i1cMBa3TgPzgrhQJyaRB+MhAOz2BAgRHYAjEvGIcHoYmo7GI9FI9HYikUlEUEGojBkglIigE7F49DpSmovA5i10aIxWJxeIJRJJZIpVJpdIZcCZLLGinZnLcnl8/iCoQGFQgTQg2hScFIaGyXxCkUG+UWjRabQqHRAXV6/SIg2h43uXhSAE8vItlh5Vm0NlsOnsQAcjl0zhcrjcIg9nu9vv9AW4QXbwZDoc04QikRoUURKLxFKQVOQsewxDIBCoZOzyYxGLRFMRGLxRBTsVI5LxaFy9BEC0WS2WK1XyDXC5R643m62pE24J2mT3Fd4/AFgmEiB8vCFtU0ftpoBBXNRsj5tO5eBAUHBTR5zc1Wu1kLawX0mgM/jBXF5fdkAArHto9RLCsTRrAG2zAMGoaeOGTTnJElzXHcjyvJ8vwAoiyIgOgqIRNOfDkIoerUJQtI1uQ9C0IIjDiAIcCUpQYgQMRtDdrQpJiC4Oh9iAhGtiRpBkRR1BUTRdFiAxTEsWxHFcTx7iriqG4DF46BQIekLZNEsTxIUeQFMUpTlFUKBNOUvoVCBFpPtaL6pu+n7fr+OQALLqY0CTemBEGbFBMGHHBMKIch0YgLG6EJlhOZ5hENZyrRMjkOw5AqKQjCCDIMhwLwlCCEyOIUJOBWCLwth0GIYi9kQCXUElKVpeQGVZTleUFbwRVUJl7BlRVtBVUCSprqqm
function doPost(e) {
// some defaults for standalone testing
e = e || {postData:{contents:"<a>a</a>"}};
e.queryString = e.queryString || "convert=xmltojson" ;
var type = e.queryString.toLowerCase().split("=");
// convert xml to json
var results = {status:"bad", error:"no errors"};
try {
@brucemcpherson
brucemcpherson / .block
Last active March 27, 2018 10:27
D3 fisheye for navigating and visualizing Google Sheets
license: gpl-3.0
height: 400
scrolling: no
border: no
@brucemcpherson
brucemcpherson / code.gs
Created September 23, 2016 10:29
mailtabgs
function doGet(e) {
var template = HtmlService.createTemplateFromFile('ht');
// Build and return HTML in IFRAME sandbox mode.
return template.evaluate();
}
function getThreads(options) {
@brucemcpherson
brucemcpherson / cDbab.cls
Created August 18, 2014 14:06
Google Apps Script database abstraction - vba client
Option Explicit
' v1.0
' this one manages interaction with dbAbstraction on Google Apps Script
Private pDbId As String
Private pSiloId As String
Private pResult As cDbAbResult
Private poAuth2 As cOauth2
Private pEndPoint As String
Private pDbName As String
Private pBrowser As cBrowser
' use like this =displayAnOldDate(makeAnOldDate(1891,1,2))
Option Explicit
Public Function makeAnOldDate(y As Long, m As Long, d As Long) As Double
makeAnOldDate = DateSerial(y, m, d)
End Function
Public Function displayAnOldDate(oldDate As Double) As String
displayAnOldDate = Format(oldDate, "dd-mmm-yyyy")
End Function
@brucemcpherson
brucemcpherson / dbAbstraction.vba
Last active July 4, 2024 04:41
demo for how to use a variety of database backends, enabled by a google apps script backend, directly from VBA. for details see http://ramblings.mcpher.com/Home/excelquirks/dbapps/dbvariety
Option Explicit
' this is how to use Google Apps Script dbabstration web app from Excel.
' version 0.2
' http://ramblings.mcpher.com/Home/excelquirks/dbabstraction
' http://ramblings.mcpher.com/Home/excelquirks/googleoauth2 for how to set up yor pc for oauth2
Public Sub demoDBAccess()
Dim data As cJobject
Dim siloId As String, places As cJobject, place As cJobject, result As cJobject, _
sheetId, driveFolder As String, fusionId As String