View MyContentFinder.cs
using Umbraco.Core;
using Umbraco.Core.Services;
using Umbraco.Web;
using Umbraco.Web.Routing;
using umbraco;
using System.Linq;
namespace MyUmbraco
{
View Load-CSOMProperties.psm1
<#
.Synopsis
Facilitates the loading of specific properties of a Microsoft.SharePoint.Client.ClientObject object or Microsoft.SharePoint.Client.ClientObjectCollection object.
.DESCRIPTION
Replicates what you would do with a lambda expression in C#.
For example, "ctx.Load(list, l => list.Title, l => list.Id)" becomes
"Load-CSOMProperties -object $list -propertyNames @('Title', 'Id')".
.EXAMPLE
Load-CSOMProperties -parentObject $web -collectionObject $web.Fields -propertyNames @("InternalName", "Id") -parentPropertyName "Fields" -executeQuery
$web.Fields | select InternalName, Id
View gist:c2e841d0a8e7a1e83542eeb5dca20f52
Verifying that +alirobe is my blockchain ID. https://onename.com/alirobe
View bom-cron.sh
# 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: https://data.gov.au/organization/bureauofmeteorology
# - star and fork this gist.
# New South Wales and ACT
curl ftp://ftp2.bom.gov.au/anon/gen/fwo/IDN11060.xml > NSW-ACT.xml
# Victoria
curl ftp://ftp2.bom.gov.au/anon/gen/fwo/IDV10753.xml > VIC.xml
View metrotheme.css
/********************
GLOBAL
*********************/
body,
textarea,
input,
keygen,
select,
button {
font-family: 'segoe ui semilight', 'segoe ui', myriad, sans-serif;
View reclaimWindows10.ps1
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.6.1, 2017-08-02
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, 'smart' features, and 3rd party bloat ...
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}
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
</a>
<div class="list-group @(collapsed?"collapse":"collapse in") well well-sm" id="macro-mediaList-folder-@folder.Id">
@foreach(var item in items) {
View gist:d5ad4cd9f3c0eed1dc27
// shows related pages in SharePoint 2013 or Office 365
// via https://gist.github.com/chrisobriensp/4375519
// 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;
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)
// http://blog.drisgill.com/2013/01/sticky-footers-in-sharepoint.html
// jQuery.noConflict();