Skip to content

Instantly share code, notes, and snippets.

Jeremy Davis jermdavis

Block or report user

Report or block jermdavis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jermdavis /
Created May 29, 2019
Verifying myself for Keybase

Keybase proof

I hereby claim:

  • I am jermdavis on github.
  • I am jermdavis ( on keybase.
  • I have a public key ASBCmmvpawRgYxXAmGg-piQyK4YuE-VmHghwBDPTQGRWuAo

To claim this, I am signing this object:

jermdavis / ClipboardFileTransfer.psm1
Last active Sep 6, 2019
A helpful PowerShell module that lets you move (smallish) files over the clipboard - useful when you have RDP access to a machine but are not allowed to share drives.
View ClipboardFileTransfer.psm1
function Write-EmbeddedFile
$Content = [System.Convert]::FromBase64String($base64)
jermdavis / Extract-TarGz.ps1
Created May 9, 2019
A PowerShell script that can extract .tar.gz files on Windows - with minimal dependencies to make it easy to use on servers.
View Extract-TarGz.ps1
# What .tar.gz file should be extracted? Must exist.
# What folder should the files be extracted into? Does not need to exist
jermdavis / SolrInstall-SIF-Extension.psm1
Last active Mar 4, 2019
Installing Solr for Sitecore v9.1 using SIF's createcert.json - Blog post explaining this at:
View SolrInstall-SIF-Extension.psm1
## private functions
# If necessary, download a file and unzip it to the specified location
function downloadAndUnzipIfRequired
jermdavis / Either.cs
Created Feb 17, 2019
An attempt at an error-friendly pipeline
View Either.cs
public struct Either<SUCCESS, FAILURE>
private readonly bool _isSuccess;
private readonly SUCCESS _success;
private readonly FAILURE _failure;
public bool IsSuccess => _isSuccess;
public bool IsFailure => !IsSuccess;
public SUCCESS SuccessValue => _success;
jermdavis / BasicPipeline.cs
Created Feb 15, 2019
An alternative example of a generic pipeline which includes logging behaviour
View BasicPipeline.cs
using System;
namespace LoggingPipeline
public interface IPipelineStep<INPUT, OUTPUT>
OUTPUT Process(INPUT input);
jermdavis / AdvancedCache.aspx
Created Nov 27, 2018
A fix to make work on Sitecore 8, plus a quick hack to view the contents of each cache
View AdvancedCache.aspx
<%@ Page language="c#" EnableEventValidation="false" AutoEventWireup="true" EnableViewState="false" %>
<%@ Import Namespace="System.Security.Permissions" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.Threading" %>
<%@ Import Namespace="System.Security.Principal" %>
<script runat="server">
void Page_Load(object sender, System.EventArgs e)
Response.Buffer = false;
jermdavis / FunctionScheduler.cs
Last active May 12, 2018
Simple scheduler class
View FunctionScheduler.cs
using System;
using System.Threading;
public class FunctionScheduler
private int _runEveryMs;
private Action _actionToRun;
private Timer _timer = null;
private object _lock = new object();
View ConfigServerRole.ps1
function Update-ConfigFile
jermdavis / DownloadFromSitecore.ps1
Last active Nov 27, 2017
Download files from from the commandline
View DownloadFromSitecore.ps1
function Fetch-WebsiteCredentials
$file = "dev.creds.xml"
You can’t perform that action at this time.