Skip to content

Instantly share code, notes, and snippets.


Patrick Doran PatD

View GitHub Profile
PatD / pbi.html
Last active Oct 21, 2020
Power BI "Publish to Web" CSS to hide gray bar under report
View pbi.html
In <iframe>, adjust height to some number safely above the height of the embed page
Tweak the 3rd clip value to some reasonable number to hide the gray bar
Adjust the min-height in .pbi
PatD / sharepoint_axios_fuse_handlebars_search.html
Created Oct 20, 2020
Custom search interface with SharePoint REST API, Axios.js, Fuse.js, and Handlebars.js
View sharepoint_axios_fuse_handlebars_search.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
PatD / sharepoint_logo_watermarker.html
Created Jul 2, 2020
Add logo watermark to SharePoint (classic) image-renditioned photos in a Picture library.
View sharepoint_logo_watermarker.html
/* We're inside an iframe */
background:url('/_layouts/images/gears_an.gif') top left no-repeat;
<!-- Rendition choices are injected here -->
PatD / load_sharePoint_list_items_REST_axios_to_tabulator.html
Created Jun 22, 2020
Load SharePoint data to Tabulator table via REST, then save selected items to LocalStorage
View load_sharePoint_list_items_REST_axios_to_tabulator.html
<!-- Tabulator.js styles-->
<link href="/site/wz-eva/makecard/js/tabulator.min.css" rel="stylesheet">
<!-- Custom styles-->
.tabulator-selected .workzonecheckbox::after {
content: 'x';
PatD / poc.html
Created Mar 9, 2020
Azure Computer Vision API - Handwriting POC
View poc.html
<!DOCTYPE html>
<title>Text Recognition Sample</title>
<link rel="stylesheet" href="">
<script src=""></script>
<script src=""></script>
<body style="margin:1em;">
PatD / convert_sp_item_to_pdf.js
Created Feb 26, 2020
Convert single SharePoint List Item data to a PDF file with JavaScript. All client side.
View convert_sp_item_to_pdf.js
Code reads query string parameter (the ID of the SharePoint List Item),
makes a GET request against SharePoint List for that item, then
converts response to a PDF file. PDF is dispalyed inline on the page,
or downloaded if IE.
View Dropdown_Multi_Query_String_Values.html
#bikePedDropDowns select{width:99%}
/* #bikePedDropDowns .col20{width:18%} */
@media only screen and (min-width: 960px){
#bikePedDropDowns .col20 {
width: 18%;
PatD / dropdown_picker.html
Created Dec 9, 2019
Dual Dropdown SharePoint REST Filtering Javascript
View dropdown_picker.html
<label for="ContractorName">Select your contractor organization from this list:</label><br />
<select name="ContractorName" id="ContractorName">
<option value="Select" selected="selected">Select</option>
<option value="ACME">Acme</option>
<label for="traineesDropdown">Choose a Trainee from this list:</label><br />
PatD / write-cookie.js
Created Nov 2, 2019
Set a cookie to expire tomorrow. Check for it's existance on run, and update content if cookie is already set.
View write-cookie.js
PatD / gist:f6023ac4df38cd1af513159d5c9a8929
Created Jun 12, 2019
SharePoint Calculated HTML Column Example
View gist:f6023ac4df38cd1af513159d5c9a8929
="<div style='margin-left:10px;float:left;text-align:left;width: 100%;margin-top: 10px;'>
<a href='"&address&" "&city&" NC "&zip&"&rtop=0~1~0' target='_blank'>
<img width='500' height='150' src='"&address&"%2C"&city&"%2CNC%2C"&zip&"/15?mapSize=800,300&format=png&key=MYBINGKEYNOTABINKEY' />
</a><br />