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
async Task Main() | |
{ | |
//Disables query caching so large datasets don't utilize large amounts of memory | |
this.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking; | |
//Disables lazy loading which is required when object tracking is disabled | |
this.ChangeTracker.LazyLoadingEnabled = false; | |
var data = (from r in Requests | |
select r).Take(1_000_000); |
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
static void Main(string[] args) | |
{ | |
SingleTest(); | |
//Benchmark(100_000_000); // 68 seconds | |
} | |
static void SingleTest() | |
{ | |
Guid origGuid = Guid.NewGuid(); |
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
void Main() | |
{ | |
SingleTest(); | |
//Benchmark(100_000_000); // 76 seconds | |
} | |
void SingleTest() | |
{ | |
Guid origGuid = Guid.NewGuid(); |
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
(New-Object System.Net.WebClient).DownloadFile("https://download.teamviewer.com/download/TeamViewerPortable.zip","$Env:TEMP\TeamViewerPortable.zip");(Expand-Archive "$Env:TEMP\TeamViewerPortable.zip" -DestinationPath "$Env:USERPROFILE\AppData\Local\TeamViewerPortable\" -Force); |
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
cinst -y xyplorer |
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
Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/JoshuaCode/a88d331e039e03aaee14ddf56387c0f6/raw/87d5f16bd5ac60b57b10b8c17d9e2d95740969c5/BoxStarterScript-Partial1.txt | |
Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/JoshuaCode/12a040324ca18e47e2ec1b19a3308475/raw/64c0d84cb02f60d40655a71a5909f160f580756c/BoxStarterScript-Partial2.txt |
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 PersonControllerTests | |
{ | |
public PersonControllerTests(ITestOutputHelper output) | |
{ | |
var correlationId = Guid.NewGuid().ToString(); | |
var logger = new LoggerConfiguration() | |
.MinimumLevel.Debug() | |
.Enrich.FromLogContext() | |
.WriteTo.XunitTestOutput(output, | |
outputTemplate: "{Timestamp:u} [{Level}] ({CorrelationId}) {Message}{NewLine}{Exception}") |
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 PersonController : Controller | |
{ | |
private readonly ILogger _logger; | |
public PersonController(ILoggerFactory loggerFactory) | |
{ | |
_logger = loggerFactory.CreateLogger(GetType().FullName); | |
} | |
// GET: api/values |
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 IServiceProvider ConfigureServices(IServiceCollection services) | |
{ | |
// Add framework services. | |
services.AddMvc(); | |
var container = new Container().WithDependencyInjectionAdapter(services); | |
var serviceProvider = container.Resolve<IServiceProvider>(); | |
return serviceProvider; | |
} |
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 System; | |
using System.Collections.Generic; | |
using DryIoc; | |
using DryIoc.AspNetCore.DependencyInjection; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Logging; | |
using Serilog; |
NewerOlder