Skip to content

Instantly share code, notes, and snippets.

Avatar

Patrick Doran PatD

View GitHub Profile
@PatD
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
-->
<style>
@PatD
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>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
@PatD
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
<style>
/* We're inside an iframe */
#waterMarkedImage{
background:url('/_layouts/images/gears_an.gif') top left no-repeat;
min-height:300px;
}
</style>
<!-- Rendition choices are injected here -->
@PatD
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-->
<style>
.tabulator-selected .workzonecheckbox::after {
content: 'x';
}
@PatD
PatD / poc.html
Created Mar 9, 2020
Azure Computer Vision API - Handwriting POC
View poc.html
<!DOCTYPE html>
<html>
<head>
<title>Text Recognition Sample</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.min.js"></script>
</head>
<body style="margin:1em;">
@PatD
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
/*
README
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
<html>
<body>
<style>
#bikePedDropDowns select{width:99%}
/* #bikePedDropDowns .col20{width:18%} */
@media only screen and (min-width: 960px){
#bikePedDropDowns .col20 {
width: 18%;
@PatD
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>
</select>
<label for="traineesDropdown">Choose a Trainee from this list:</label><br />
@PatD
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
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='https://www.bing.com/maps?where1="&address&" "&city&" NC "&zip&"&rtop=0~1~0' target='_blank'>
<img width='500' height='150' src='https://dev.virtualearth.net/REST/V1/Imagery/Map/Road/"&address&"%2C"&city&"%2CNC%2C"&zip&"/15?mapSize=800,300&format=png&key=MYBINGKEYNOTABINKEY' />
</a><br />
</div>"