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
<?xml version="1.0" encoding="utf-8" ?> | |
<NotFoundHandlers> | |
<notFound assembly="umbraco" type="SearchForAlias" /> | |
<notFound assembly="umbraco" type="SearchForTemplate"/> | |
<notFound assembly="umbraco" type="SearchForProfile"/> | |
<notFound assembly="CatchAllRouteHandler" namespace="Our" type="CatchAll"/> | |
<notFound assembly="umbraco" type="handle404"/> | |
</NotFoundHandlers> |
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 Umbraco.Core; | |
using Umbraco.Core.Services; | |
using Umbraco.Web.Mvc; | |
using Umbraco.Web.Routing; | |
namespace Our.Umbraco | |
{ | |
public class MyApplication : ApplicationEventHandler | |
{ | |
protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title> - jsFiddle demo</title> | |
<script type='text/javascript' src='/js/lib/dummy.js'></script> | |
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 FileStorage : IDisposable { | |
private static readonly Dictionary<string, Mutex> Mutexes = new Dictionary<string, Mutex>(); | |
public async Task DoSomethingAsync(string accountId) { | |
var mutex = GetMutex(accountId); | |
try { | |
mutex.WaitOne(); | |
// Do something to files | |
} |
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
module tweak { | |
function getViewUrl(viewName: string) { | |
return `/App_Plugins/tweaks/views/${viewName}.html`; | |
} | |
export class views { | |
static mediaPicker = getViewUrl("media-picker"); | |
} |
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 struct Fast2DArray<T> | |
{ | |
public T[] Data; | |
public int Width; | |
public int Height; | |
public Fast2DArray(T[,] data) | |
{ | |
this.Height = data.GetLength(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 class Configuration | |
{ | |
public MemoryManager MemoryManager { get; set; } = SharedPoolingManagedMemoryManager.Instance; | |
public static Configuration Default { get; } | |
// ... | |
} | |
public interface IDecoderOptions |
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
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <cassert> | |
using uint = unsigned int; | |
template<typename T> | |
std::ostream& operator<<(std::ostream& os, const std::vector<T>& vec) | |
{ |
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
# Usage: .\DisableNuGetPackageRestore.ps1 C:\Path\To\Solution.sln | |
# Get the path that the user specified when calling the script | |
$solution = $args[0] | |
$solutionPath = Split-Path $solution -Parent | |
$solutionName = Split-Path $solution -Leaf | |
# Delete the .nuget directory and all contents | |
Remove-Item (Join-Path $solutionPath ".nuget") -Force -Recurse -ErrorAction 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
using Microsoft.CodeAnalysis; | |
using Microsoft.CodeAnalysis.CSharp; | |
using Microsoft.CodeAnalysis.CSharp.Syntax; | |
using Microsoft.CodeAnalysis.Text; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
namespace NetStandardCleanup |