Skip to content

Instantly share code, notes, and snippets.

View bradchristie-velir's full-sized avatar

Brad Christie bradchristie-velir

View GitHub Profile
// Borrowed from Microsoft's download page
function DownloadURL(n, t) {
if ((jQuery.browser || navigator.userAgent.toLowerCase().indexOf("trident") > 0) && t != "mainDownloadNonBundle")
window.open(n, "_blank", "toolbar=0,location=no,directories=0,status=0,scrollbars=no,resizable=0,width=0,height=1,top=0,left=0");
else {
var i;
i = document.getElementById(t);
i === null && (i = document.createElement("iframe"),
i.id = t,
i.style.visibility = "hidden",
@bradchristie-velir
bradchristie-velir / FixOrphans.sql
Created March 11, 2021 18:32
Fix orphaned SQL logins
SET NOCOUNT ON
USE [database_name]
GO
DECLARE @loop INT
DECLARE @USER sysname
DECLARE @sqlcmd NVARCHAR(500) = ''
IF OBJECT_ID('tempdb..#Orphaned') IS NOT NULL
BEGIN
@bradchristie-velir
bradchristie-velir / Create-SOLRCertificate.ps1
Last active June 14, 2021 18:17
Create a self-signed SOLR certificate
[CmdletBinding()]
Param(
[Parameter()]
[switch]$JKS
)
$keytool = Get-Command "keytool" -ErrorAction "SilentlyContinue"
If ($null -eq $keytool) {
Write-Output "Doesn't look like you have access to keytool. Please download and install OpenJDK from https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot (ensuring to add the JAVA_HOME feature) and try again."
Exit 1
@bradchristie-velir
bradchristie-velir / Create-SOLRIndexes.ps1
Last active September 23, 2020 18:22
Create SOLR Indexes
[CmdletBinding(SupportsShouldProcess)]
Param(
[Parameter()]
[ValidateScript({ Test-Path $_ -PathType "Container" })]
[string]$SolrInstallDir = "C:\solr-7.5.0"
,
[Parameter()]
[ValidateNotNull()]
[string]$SolrServiceName = "*solr*"
,