Skip to content

Instantly share code, notes, and snippets.

View DotTech's full-sized avatar

Ruud van Falier DotTech

View GitHub Profile
@DotTech
DotTech / gist:1be06fac079a9863a7b8
Created November 10, 2015 15:10
Pipeline processor with URL
public class ProcessorWithUrlBase
{
public string Url { get; set; }
protected bool IsAllowedRequest(HttpRequestArgs args)
{
return string.IsNullOrWhiteSpace(this.Url) || args.Context.Request.RawUrl.StartsWith(this.Url, StringComparison.OrdinalIgnoreCase);
}
}
@DotTech
DotTech / gist:4bc7d139b3d5cad0a7de
Created July 17, 2015 09:37
Xamarin: Error MT2002: Failed to resolve “System.Void System.Security.Cryptography.SHA1Cng::.ctor()”
Cleaning: Rumar.Xamarin.Venus.iOS (Debug|iPhoneSimulator)
Build started 7/17/2015 11:35:46 AM.
__________________________________________________
Project "/Users/ruudvanfalier/Rumar/Projects/Rumar-Xamarin-Framework/src/Rumar.Xamarin.Venus.iOS/Rumar.Xamarin.Venus.iOS.csproj" (Clean target(s)):
Target CoreClean:
Deleting file '/Users/ruudvanfalier/Rumar/Projects/Rumar-Xamarin-Framework/src/Rumar.Xamarin.Venus.iOS/obj/iPhoneSimulator/Debug/Xamarin.iOS,Version=v1.0.AssemblyAttribute.cs'
Deleting file '/Users/ruudvanfalier/Rumar/Projects/Rumar-Xamarin-Framework/src/Rumar.Xamarin.Venus.iOS/bin/iPhoneSimulator/Debug/Venus.exe.mdb'
@DotTech
DotTech / gist:b075b6fd2e175c77a173
Created October 1, 2014 08:14
Sitecore xDB: Install & start MongoDB as Windows service
$service = Get-WmiObject -Class Win32_Service -Filter "Name='MongoDB'"
if ($service -eq $null)
{
$MongoPath = "d:\mongo\mongod.exe"
$MongoLogPath = "d:\mongo\logs\mongod.log"
$MongoDataFolder = "d:\mongo\data"
$binaryPath = "`"$MongoPath`" --service --logpath `"$MongoLogPath`" --dbpath `"$MongoDataFolder`""
New-Service -Name MongoDB -BinaryPathName $binaryPath -Description "MongoDB for Sitecore EMS" -DisplayName "MongoDB" -StartupType auto | Out-Null
@DotTech
DotTech / gist:5240460
Created March 25, 2013 20:34
Explanation of a feature request for Glass Mapper
Let's say I have a template an overview page - a page that shows an overview of child items - and I need a Glass Mapper model of that.
This overview page can be used to display different type of child items.
Child items also have Glass Mapper models.
So I have:
- News items, with the model NewsItemModel
- Blog items, with the model BlogItemModel
- Overview items, with the model OverviewPageModel
Now I would like the OverviewPageModel to be of a generic type: OverviewPageModel<T>