This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am darrenferguson on github. | |
* I am darrenferguson (https://keybase.io/darrenferguson) on keybase. | |
* I have a public key whose fingerprint is 138F 786D 6C5D 3EE4 5429 94B1 3E81 F7EC F93D 9E48 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyPublishedContent : PublishedContentBase | |
{ | |
public MyPublishedContent(string xml) | |
{ | |
var doc = new XmlDocument(); | |
doc.LoadXml(xml); | |
_xmlNode = doc.DocumentElement; | |
} | |
private readonly XmlNode _xmlNode; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ArchiveContentFinder : IContentFinder | |
{ | |
public bool TryFindContent(PublishedContentRequest contentRequest) | |
{ | |
var path = contentRequest.Uri.GetAbsolutePathDecoded(); | |
var db = ApplicationContext.Current.DatabaseContext.Database; | |
var archived = db.SingleOrDefault<Archive>("select * from archive where Url = @0 or Url = @1", path, path + "/"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Archive | |
{ | |
public int Id { get; set; } | |
public string Url { get; set; } | |
public string Xml { get; set; } | |
} | |
public static class PublishedContentExtensions | |
{ | |
public static void Archive(this IContent content) |
NewerOlder