Skip to content

Instantly share code, notes, and snippets.

View robdmoore's full-sized avatar

Rob Moore (MakerX) robdmoore

View GitHub Profile
@robdmoore
robdmoore / README.md
Last active February 21, 2023 11:04
Example output stability diff for Beaker 0.x -> 1.0
@robdmoore
robdmoore / _readme.md
Last active March 31, 2018 09:27
Wordpress -> Jekyll converter

Following https://mdavies.net/2014/11/27/migrating-wpjekyll/#migrate-from-wordpress you can convert your posts across to Jekyll format, but it adds superfluous metadata and also doesn't correctly handle Wordpress shorttags. This program helps with that.

Fair warning: it's deliberately dirty / hacky code. I ran it with the posts in a Git repo and inspected file-by-file tweaking as I went.

@robdmoore
robdmoore / ThreadsafeBddfyTextReporter.cs
Last active February 15, 2017 10:59
Xunit2 compatible Bddfy output reporter
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using TestStack.BDDfy;
using TestStack.BDDfy.Configuration;
namespace {SomeProject}.Tests.TestHelpers
{

All public gists in this account are Public Domain unless a separate license is included in the Gist.

@robdmoore
robdmoore / setup.sql
Last active October 28, 2024 07:08
Automated install of SQL Express from commandline
# If you want to give owner access to the whole server to a particular user account this is how
exec sp_addrolemember 'db_owner', 'NT AUTHORITY\NETWORK SERVICE';
GO
# If you want to idempotently ensure a particular database with name DatabaseName exists this is how
IF NOT db_id('DatabaseName') IS NOT NULL BEGIN
PRINT 'Creating database...'
CREATE DATABASE [DatabaseName]
PRINT 'Created database.'
@robdmoore
robdmoore / gist:d2b0fb0ae8f1ff104194
Last active August 29, 2015 14:22
Install App Insights into Virtual Machine using PowerShell
function Install-AppInsights($instrumentationKey) {
mkdir c:\tempappinsights -Force
pushd c:\tempappinsights
try {
(New-Object Net.WebClient).DownloadFile('http://appinsightsstatusmonitor.blob.core.windows.net/statusmonitor/ApplicationInsights.ps1.zip',"c:\tempappinsights\ApplicationInsights.ps1.zip")
Expand-ZipFile C:\tempappinsights\ApplicationInsights.ps1.zip c:\tempappinsights
. C:\tempappinsights\ApplicationInsights.ps1
ApplicationInsightsConfig $instrumentationKey
Start-DscConfiguration -Path C:\tempappinsights\ApplicationInsightsConfig -ComputerName localhost
} finally {

Keybase proof

I hereby claim:

  • I am robdmoore on github.
  • I am robdmoore (https://keybase.io/robdmoore) on keybase.
  • I have a public key whose fingerprint is 7EC9 85C2 A5C2 4121 3EFB 4258 4730 FEAF BA2E 9A78

To claim this, I am signing this object:

@robdmoore
robdmoore / gist:44221cc1028ac038931b
Created December 15, 2014 09:23
Using GitVersion to publish tags to Git repository on various CI servers

TeamCity

Command Line > Custom Script

"C:\Program Files (x86)\Git\bin\git.exe" tag "%dep.YOUR_CI_BUILD_CONFIG.GitVersion.SemVer%"
"C:\Program Files (x86)\Git\bin\git.exe" push https://%GitUsername%:%GitPassword%@%GitUrl% "%dep.YOUR_CI_BUILD_CONFIG.GitVersion.SemVer%"

Bamboo

Executable > Git Version

@robdmoore
robdmoore / forms.showhide.js
Last active August 29, 2015 14:05
Foolproof validation with show/hide
$(function() {
$("form").each(function() {
$(this).find("[data-val-requiredif]").each(function() {
var $field = $(this);
var comparisonValue = $field.data("val-requiredif-dependentvalue");
var operator = $field.data("val-requiredif-operator");
var passonnull = $field.data("val-requiredif-passonnull");
var dependentPropertyName = $field.data("val-requiredif-dependentproperty");
var dependentProperties = $("[name=" + dependentPropertyName + "]");