Skip to content

Instantly share code, notes, and snippets.


Ali Robertson alirobe

View GitHub Profile
View metrotheme.css
button {
font-family: 'segoe ui semilight', 'segoe ui', myriad, sans-serif;
alirobe / reclaimWindows10.ps1
Last active May 8, 2021
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of (different defaults). N.…
View reclaimWindows10.ps1
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <>
# Modified by: alirobe <> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source:
# Tweaked Source:
# Tweak difference:
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
alirobe / enable-impersonation.ps1
Last active Mar 8, 2016
Enable CRM 2013 SP1 - Exchange 2013 Synchronisation
View enable-impersonation.ps1
# run on exchange machine
add-pssnapin Microsoft.Exchange.Management.PowerShell.SnapIn
$serviceAccountName = "CrmEmailServiceAcct"
$serviceAccountUser = Get-User -Identity $serviceAccountName
Get-ExchangeServer | where {$_.IsClientAccessServer -eq $TRUE} | ForEach-Object {
Add-ADPermission -Identity $_.distinguishedname -User $serviceAccountUser.identity -AccessRights ExtendedRight -ExtendedRight ms-Exch-EPI-Impersonation
Add-ADPermission -Identity $_.distinguishedname -User $serviceAccountUser.identity -AccessRights ExtendedRight -ExtendedRight ms-Exch-EPI-May-Impersonate
Get-MailboxDatabase | ForEach-Object {Add-ADPermission -Identity $_.DistinguishedName -User $serviceAccountName -ExtendedRights ms-Exch-EPI-May-Impersonate}
alirobe / umbraco-filebrowser.cshtml
Last active Nov 20, 2019
A simple recursive media folder/file viewer macro for directory browsing in #Umbraco 7+, using Bootstrap 3 for display. Not suitable for >100 files (use a surfacecontroller)
View umbraco-filebrowser.cshtml
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@{ var mediaId = Model.MacroParameters["mediaId"]; }
@helper DisplayFolder(dynamic folder, bool collapsed) {
var items = folder.Children().OrderBy("DocumentTypeAlias Desc,Name");
if (items.Any()) {
<a class="list-group-item" role="button" aria-expanded="false" data-toggle="collapse" href="#macro-mediaList-folder-@folder.Id">
<i class="glyphicon glyphicon-folder-open"></i> &nbsp; @folder.Name
<div class="list-group @(collapsed?"collapse":"collapse in") well well-sm" id="macro-mediaList-folder-@folder.Id">
@foreach(var item in items) {
alirobe / gist:d5ad4cd9f3c0eed1dc27
Created Jul 2, 2015
SharePoint 2013 Related Pages
View gist:d5ad4cd9f3c0eed1dc27
// shows related pages in SharePoint 2013 or Office 365
// via
// requires (minified under 10k): underscorejs, es6-promise (ES6 polyfill), fetch (ES6 polyfill)
function(element, title, count) {
var header = '<b>'+title+'</b><br/>';
var _linkTmpl = _.template('<a href="<%=Cells.results[6].Value%>"><%=Cells.results[3].Value%></a>');
var linkJoin = '<br/>';
var linkCount = count;
alirobe / stickyfooter-2010.js
Last active Dec 15, 2015
A modification of Randy Drisgill's "Sticky footers in SharePoint" for SP2010. Works for me...
View stickyfooter-2010.js
// Place the #custom-footer directly after the close of #s4-bodyContainer, and apply float:left to it.
// What needed changing:
// - consistent use of the jQueryFooter variable (rather than re-selecting the footer to apply the margin-top)
// - changed/simplified the math to calculate the difference, adding s4-mainarea (which floats:left and is not included in bodyContainer)
// - did not force footer to show in dialog boxes (use .ms-dialog #custom-footer {display:none} in CSS to hide)
// jQuery.noConflict();
alirobe / masterfile-snippet.html
Last active Oct 13, 2015
Enable Chrome 'quick-search' for SharePoint Intranets
View masterfile-snippet.html
add inside the 'head' element of master page.
replace title="Intranet" with the name of your intranet (if branded)
<link rel="search" title="Intranet" type="application/opensearchdescription+xml" href="/Style%20Library/opensearch.xml" />
alirobe / SP2010-chromeScrollingFix
Last active Jan 13, 2017
Fix an issue where occasionally the JavaScript that runs a SharePoint 2010 page's dynamic elements (ribbon, scrolling, etc) fails to initialise in Webkit browsers.
View SP2010-chromeScrollingFix
//via or
if (jQuery.browser.webkit) {
jQuery(document).ready(function () {
var interval;
function loopCheck() {
if (typeof (_spBodyOnLoadWrapper) !== "undefined" && _spBodyOnLoadCalled == false)
alirobe / html5.master.part
Created Feb 1, 2012
On-demand IE9 rendering for SharePoint 2010 Master Pages.
View html5.master.part
<asp:ContentPlaceHolder runat="server" id="html5">
<-- In your .aspx page, use a override this ContentPlaceHolder using "IE=9" to enable HTML5 features - on pages where it's required... -->
<meta http-equiv="X-UA-Compatible" content="IE=8"/>
alirobe / style library-v5-script-v5.js
Last active Sep 29, 2015's Responsive SP2010 (sans HTML5, via @alirobe)
View style library-v5-script-v5.js
//'s Responsive SP2010 (sans HTML5, via @alirobe)
// add me to the bottom of v5.js
// via gist @
window.onresize = function(){
var w=800, t=" lt-800 ", cw, h;
h = document.getElementsByTagName("html")[0];
cw = window.outerWidth||h.clientWidth;
if (cw<=w) {if(h.className.indexOf(t)==-1) {h.className+=t}}
else {h.className=h.className.replace(/lt-800/g,'').replace(/[\s]{2,}/g,' ');}