Skip to content

Instantly share code, notes, and snippets.

View alirobe's full-sized avatar

Ali Robertson alirobe

View GitHub Profile
alirobe / pdf-ifilter-registration.reg
Created May 8, 2024 06:59
PDF IFilter Registration
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\Gathering Manager\Plugins]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\Gathering Manager\Plugins\.pdf]
alirobe / Convert-DocumentsToMachineReadable.ps1
Created April 12, 2023 12:44
$popplerPath = ".\poppler\bin\pdftotext.exe"
$maxDocs = 1000
$inputPath = ".\source"
$outputPath = ".\dest"
function Convert-FilesToMarkdown {
alirobe / pnp-list-copy.ps1
Last active May 22, 2024 20:59
Copy list contents between lists in SharePoint using PnP
# authored @alirobe for @sopewebtech 2022-06-17
# pnp-list-copy.ps1 :
# this copies list values from source to target
# before using this script, create a new list 'from existing list' in the same site
# then, plug values in below and run. should work for most field types. any issues let me know.
# todo: add batching, add field types
# licensed under GPL V2
$Site = ""
alirobe / SecureMediaController.cs
Last active November 23, 2023 02:36
Secure Media Controller for Umbraco v9 Cloud
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using MimeKit;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.IO;
namespace UmbracoProject.Controllers
public class SecureMediaController : Controller
alirobe / export-umbraco-redirects-for-seochecker.sql
Last active May 19, 2022 21:10
How to Migrate Umbraco Redirects into SEOChecker
SELECT replace(umbracoRedirectUrl.url, '1075/', '') as url
FROM umbracoRedirectUrl
INNER JOIN umbracoNode on umbracoRedirectUrl.contentKey = umbracoNode.uniqueID
# Run in SSMS, right click results and export to CSV. Import CSV to SEOChecker.
# NB replace 1075 with your root node ID
alirobe / PostToUrlAsJson.cs
Last active March 25, 2024 14:41
Umbraco Forms Workflow - POST to URL as JSON (with optional Bearer Access Token). Just place this file anywhere in your Umbraco+Forms project, and the dependency injection will pick it up. This will allow you to connect to Microsoft Flow or Zapier or any integration web service, from which you can send to Salesforce/Dynamics/etc.
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Dynamic;
using System.Net;
using System.Text.RegularExpressions;
using Umbraco.Core.Logging;
using Umbraco.Forms.Core;
using Umbraco.Forms.Core.Attributes;
alirobe / SP2013-video-cewp-ios-restrictions.txt.html
Last active June 21, 2018 01:21
This is an iOS compatible method of embedding a video from SharePoint, if blob storage is not enabled.
<video controls="true" style="min-height:360px;width:100%;">
<source src="/PublishingImages/your-video.mp4">
Sorry, your browser does not support playback of this video.
if (/iPhone|iPad|iPod/i.test(navigator.userAgent) ||'video-ios-test') != -1) {
alirobe / dotVscodeDir-extensions.json
Created May 17, 2018 05:57
Productive React & TypeScript Settings
"recommendations": [
alirobe / reduceCrmv9Spacing.js
Last active February 25, 2020 09:18
Reduce Dynamics 365 v9 Field Spacing
if(!window.parent.document.querySelector('style#v9removepadding')) {
var style = window.parent.document.createElement('style'); = "v9removepadding";
style.innerText = ".acwallEmailView .emailexpandedaccordion { margin:0; width:100% } td { padding: 4px 1px 1px 16px !important; min-height: 26px; }";
alirobe / setupWindowsServer2016.ps1
Created September 15, 2017 07:37
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <>
# Modified by: alirobe <> based on my personal preferences.
# Version: 2.6.1, 2017-08-02
# Primary Author Source:
# Tweaked Source:
# Tweak difference:
# @alirobe's version is a subset focused on safely disabling telemetry, 'smart' features, and 3rd party bloat ...