Skip to content

Instantly share code, notes, and snippets.

alirobe / gist:d5ad4cd9f3c0eed1dc27
Created July 2, 2015 05:11
SharePoint 2013 Related Pages
// 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 / sp2010 full breadcrumb.aspx
Created October 14, 2011 00:51
Full SP2010 Breadcrumb (for master page)
Preview -
<div id="new-breadcrumb" class="s4-notdlg">
<div class="s4-titletext">
<h1 name="onetidProjectPropertyTitle">
<asp:SiteMapPath runat="server" SiteMapProvider="SPContentMapProvider">
<span class="s4-nothome s4-bcsep s4-titlesep">
<SharePoint:ClusteredDirectionalSeparatorArrow runat="server"/>
alirobe / spf-dropdown.js
Last active September 27, 2015 18:18
SharePoint Foundation Drop-down Navigation
spfDropDowns v.1 by @alirobe - gist: 1312059
To use this, just structure your top-menu bar links by using a leading '-- '
to denote submenu items, e.g.
Menu Item
-- Submenu Item
Menu Item
-- Submenu Item
-- Submenu Item
alirobe / style library-v5-script-v5.js
Last active September 29, 2015 17:47's Responsive SP2010 (sans HTML5, via @alirobe)
//'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,' ');}
alirobe / stickyfooter-2010.js
Last active December 15, 2015 06:39
A modification of Randy Drisgill's "Sticky footers in SharePoint" for SP2010. Works for me...
// 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 / enable-impersonation.ps1
Last active March 8, 2016 07:47
Enable CRM 2013 SP1 - Exchange 2013 Synchronisation
# 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 /
Last active May 17, 2016 05:25
simple cron job that downloads weather forecasts from australian bureau of meteorology
# This script downloads weather forecasts from BOM
# Please ensure you comply with their usage terms and copyright...
# & to keep up with changes to this API
# - follow BOM here:
# - star and fork this gist.
# New South Wales and ACT
curl > NSW-ACT.xml
# Victoria
curl > VIC.xml
Verifying that +alirobe is my blockchain ID.
alirobe / SP2010-chromeScrollingFix
Last active January 13, 2017 18:54
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.
//via or
if (jQuery.browser.webkit) {
jQuery(document).ready(function () {
var interval;
function loopCheck() {
if (typeof (_spBodyOnLoadWrapper) !== "undefined" && _spBodyOnLoadCalled == false)
alirobe / dotVscodeDir-extensions.json
Created May 17, 2018 05:57
Productive React & TypeScript Settings
"recommendations": [