This file contains hidden or 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
Measure-Command { & C:\mybatfile.bat | Out-Default} |
This file contains hidden or 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 System.Linq; | |
using System.Text.RegularExpressions; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
namespace BenchITSplit | |
{ | |
class Program |
This file contains hidden or 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
find *.png -type f -exec curl -i -F filedata=@{} http://servername/image \; |
This file contains hidden or 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 alfeg on github. | |
* I am alfeg (https://keybase.io/alfeg) on keybase. | |
* I have a public key ASAos-cuH6vcwnT76XrUspk4nCNb4Wux4V5mQY_vQVemVgo | |
To claim this, I am signing this object: |
This file contains hidden or 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 DotMemoryProfile : IDisposable | |
{ | |
public DotMemoryProfile() | |
{ | |
if (MemoryProfiler.IsActive && MemoryProfiler.CanControlAllocations) | |
MemoryProfiler.EnableAllocations(); | |
MemoryProfiler.Dump(); | |
} | |
public void Dispose() |
This file contains hidden or 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 OneToManyAttribute : RelationAttribute | |
{ | |
public string ForeignKey { get; } | |
public OneToManyAttribute(string foreignKey) | |
{ | |
this.ForeignKey = foreignKey; | |
} | |
public override void SetProperty(PropertyInfo info) |
This file contains hidden or 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 PerHostJsonConfigBuilder : ConfigurationBuilder | |
{ | |
public string Directory { get; set; } | |
JObject hostConfig = null; | |
public override void Initialize(string name, NameValueCollection config) | |
{ | |
base.Initialize(name, config); | |
JObject LoadByHostName(string host) |
This file contains hidden or 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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>netstandard2.0</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Google.Protobuf" Version="3.6.1" /> | |
<PackageReference Include="Grpc" Version="1.14.2" /> | |
<PackageReference Include="Grpc.Tools" Version="1.14.2" /> | |
</ItemGroup> |
This file contains hidden or 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
param([string] $i, [string] $time, [string] $output) | |
ffmpeg -i $i -acodec copy -vcodec copy -to $time "$output-1.m4v" | |
ffmpeg -i $i -acodec copy -vcodec copy -ss $time "$output-2.m4v" |
This file contains hidden or 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 PartialFileContentResult : ActionResult | |
{ | |
private readonly Stream stream; | |
private readonly string contentType; | |
private readonly CancellationToken token; | |
/// <summary>Initializes a new instance of the <see cref="T:System.Web.Mvc.FileContentResult" /> class by using the specified file contents and content type.</summary> | |
/// <param name="fileContents">The byte array to send to the response.</param> | |
/// <param name="contentType">The content type to use for the response.</param> | |
/// <exception cref="T:System.ArgumentNullException">The <paramref name="fileContents" /> parameter is null.</exception> |