Skip to content

Instantly share code, notes, and snippets.

View darrenferguson's full-sized avatar

Darren Ferguson darrenferguson

View GitHub Profile
using System.Linq;
using Examine;
using Umbraco.Core.Persistence;
using Umbraco.Web;
using UmbracoExamine;
namespace Moriyama.PlasterCast.Examine.Indexer
{
public class FasterInternalIndexer : UmbracoContentIndexer
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Configuration;
using Umbraco.Core.Configuration.UmbracoSettings;
using Umbraco.Core.Models;
using Umbraco.Web;
using Umbraco.Web.Routing;
namespace Moriyama.Core.Routing.UrlProviders
using System.Linq;
using System.Web.Configuration;
using Umbraco.Web.Routing;
namespace Moriyama.Core.Routing.ContentFinders
{
/// <summary>
/// A content finder which looks for content items which are children of an Umbraco Hidden Folder.
/// </summary>
public class UmbracoHiddenFolderChildrenContentFinder : ContentFinderByNiceUrl
using System.Web.Configuration;
using Umbraco.Core;
using Umbraco.Web.Routing;
namespace Moriyama.Core.Routing.ContentFinders
{
public class UmbracoHiddenFolderContentFinder : ContentFinderByNiceUrl
{
public override bool TryFindContent(PublishedContentRequest contentRequest)
{
using log4net;
using Moriyama.Core.Routing.ContentFinders;
using Moriyama.Core.Routing.UrlProviders;
using System.Reflection;
using Umbraco.Core;
using Umbraco.Web.Routing;
namespace Moriyama.Core.Events
{
public class UmbracoBooter : IApplicationEventHandler
public ActionResult GetFileStreamResult(UrlInformation urlInformation, HttpContext context)
{
string url = urlInformation.Path;
string connection = ConfigurationManager.AppSettings["AzureBlobFileSystem.ConnectionString:media"];
string containerName = ConfigurationManager.AppSettings["AzureBlobFileSystem.ContainerName:media"];
CloudStorageAccount cloudStorageAccount = CloudStorageAccount.Parse(connection);
var client = cloudStorageAccount.CreateCloudBlobClient();
var container = client.GetContainerReference(containerName);
@darrenferguson
darrenferguson / k6.js
Created December 6, 2022 11:32
Hello World K6
import http from 'k6/http';
import { check, sleep } from 'k6';
import { randomItem } from 'https://jslib.k6.io/k6-utils/1.2.0/index.js';
export const options = {
stages: [
{ duration: '30s', target: 20 },
{ duration: '1m30s', target: 10 },
{ duration: '20s', target: 0 },