Skip to content

Instantly share code, notes, and snippets.

Brendan McKenzie brendanmckenzie

Block or report user

Report or block brendanmckenzie

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
View ListFilter.cs
public abstract class ListFilter
{
public string Name { get; set; }
public Type ValueType { get; set; }
public Type ArgumentType { get; set; }
public object DefaultValue { get; set; }
View PatchController.cs
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.JsonPatch;
using Microsoft.AspNetCore.JsonPatch.Operations;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json.Linq;
using MyApp.Models;
View webpack.config.js
module.exports = {
mode: process.env.NODE_ENV || "development",
entry: {
main: "./src/js/main.js"
},
output: {
filename: "[name].js"
},
module: {
rules: [
View output.json
{
"body": {
"component": "container",
"model": null,
"placeholders": [
{
"key": "content",
"controls": [
{
"component": "markdown",
View ExceptionTest.cs
using System;
using System.Diagnostics;
using System.Linq;
namespace ExceptionTest
{
class Program
{
const int SampleSize = 1000000;
View keybase.md

Keybase proof

I hereby claim:

  • I am brendanmckenzie on github.
  • I am brendanmckenzie (https://keybase.io/brendanmckenzie) on keybase.
  • I have a public key ASCUFDT0tAQNf2v32bqoa2J613EhyT5fy7IHZFnrf6eVtgo

To claim this, I am signing this object:

View load-cores.ps1
@(
"MCM_core_index",
"MCM_fxm_master_index",
"MCM_fxm_web_index",
"MCM_marketing_asset_index_master",
"MCM_marketing_asset_index_web",
"MCM_marketingdefinitions_master",
"MCM_marketingdefinitions_web",
"MCM_master_index",
"MCM_suggested_test_index",
@brendanmckenzie
brendanmckenzie / backup-dbs.sql
Last active Mar 21, 2018
Sitecore 9 Installation
View backup-dbs.sql
backup database [SC90_Core] to disk = 'C:\\temp\\SC90_Core.bak';
backup database [SC90_EXM.Master] to disk = 'C:\\temp\\SC90_EXM.Master.bak';
backup database [SC90_ExperienceForms] to disk = 'C:\\temp\\SC90_ExperienceForms.bak';
backup database [SC90_Master] to disk = 'C:\\temp\\SC90_Master.bak';
backup database [SC90_Processing.Tasks] to disk = 'C:\\temp\\SC90_Processing.Tasks.bak';
backup database [SC90_Reporting] to disk = 'C:\\temp\\SC90_Reporting.bak';
backup database [SC90_Web] to disk = 'C:\\temp\\SC90_Web.bak';
backup database [SC90_MarketingAutomation] to disk = 'C:\\temp\\SC90_MarketingAutomation.bak';
backup database [SC90_Messaging] to disk = 'C:\\temp\\SC90_Messaging.bak';
backup database [SC90_Processing.Pools] to disk = 'C:\\temp\\SC90_Processing.Pools.bak';
View BasicProfiler.cs
internal sealed class BasicProfiler : IDisposable
{
readonly string _key;
readonly System.Diagnostics.Stopwatch _stopwatch;
public BasicProfiler(string key)
{
_key = key;
_stopwatch = new System.Diagnostics.Stopwatch();
_stopwatch.Start();
View kasbah-quickstart.md

Quick start

docker run --name kasbah_db -d -p '5432:5432' -e POSTGRES_PASSWORD=docker postgres:9.6
docker run --name kasbah_cache -d -p '6379:6379' redis

psql -h localhost -U postgres -c "create user kasbah with password 'kasbah'"
psql -h localhost -U postgres -c "create database kasbah with owner kasbah"

curl -o /tmp/kasbah_db.sql https://gist.githubusercontent.com/brendanmckenzie/7fc8d763f19ad69041b205f7eaea06c9/raw/865d36b30e18e2b8984930581e8a3166820c5689/kasbah_db.sql
psql -h localhost -U kasbah -f /tmp/kasbah_db.sql
You can’t perform that action at this time.