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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>netcoreapp2.0</TargetFramework> | |
<IsPackable>false</IsPackable> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="AutoFixture.AutoFakeItEasy" Version="4.1.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 Contact : IHubSpotEntity | |
{ | |
[DefaultProperty("vid")] | |
public long Id { get; set; } | |
[DefaultProperty("portal-id")] | |
public long PortalId { get; set; } | |
[DefaultProperty("is-contact")] | |
public bool IsContact { get; set; } |
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
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] | |
public class AutoValueAttribute : DataAttribute, IParameterDataSource | |
{ | |
private readonly Lazy<IFixture> _fixtureLazy; | |
private IFixture Fixture => _fixtureLazy.Value; | |
public AutoValueAttribute() : this (() => new Fixture()) | |
{ | |
} |
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<IReadOnlyList<T>> FetchAll<T, TRequest, TResponse> ( | |
Func<TRequest> requestFactory, | |
Func<TRequest, Task<TResponse>> requestor, | |
Func<TResponse, string> tokenGetter, | |
Action<TRequest, string> tokenSetter, | |
Func<TResponse, IEnumerable<T>> resultExtractor, | |
Func<TResponse, bool> hasMore | |
) | |
{ | |
if (requestFactory == null) throw new ArgumentNullException(nameof(requestFactory)); |
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
Disable-UAC | |
#--- Initial Windows Config --- | |
Update-ExecutionPolicy Unrestricted | |
Set-WindowsExplorerOptions -EnableShowFileExtensions -EnableShowFullPathInTitleBar -DisableOpenFileExplorerToQuickAccess | |
Enable-RemoteDesktop | |
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneExpandToCurrentFolder -Value 1 | |
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneShowAllFolders -Value 1 | |
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Value 1 |
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
# Fetches credentials from default profile | |
# It uses the AWS Powershell cmdlet | |
$credentials = (Get-AWSCredentials -ProfileName default).GetCredentials() | |
$accessKey = $credentials.AccessKey | |
$secretKey = $credentials.SecretKey | |
# Creates a container for later reuse | |
docker create -p 2000:2000/udp -e AWS_ACCESS_KEY_ID=$accessKey -e AWS_SECRET_ACCESS_KEY=$secretKey -e AWS_REGION=eu-west-1 --name aws-xray namshi/aws-xray | |
# Starts the container |
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
C:\Users\Renato> docker info | |
Containers: 2 | |
Running: 0 | |
Paused: 0 | |
Stopped: 2 | |
Images: 2 | |
Server Version: 18.03.1-ce | |
Storage Driver: lcow (linux) windowsfilter (windows) | |
LCOW: | |
Windows: |
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
Bio: | |
Born in Napoli, Italy, living in Stockholm, Sweden. Passionate about distributed software architecture and .NET. Proud owner of a Windows 10 Mobile. | |
URL: | |
http://www.educationsmediagroup.com/ | |
Company: | |
CTO at Educations Media Group ( @emgdev ) | |
Location: |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>netcoreapp2.0</TargetFramework> | |
<IsPackable>false</IsPackable> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="AutoFixture" Version="4.6.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 QueueSubject<T> : ISubject<T> | |
{ | |
private readonly Subject<T> _subject = new Subject<T>(); | |
private readonly Queue<Action<IObserver<T>>> _actions = new Queue<Action<IObserver<T>>>(); | |
private bool _isCompleted = false; | |
private Exception _error; | |
public bool IsRunning => !_isCompleted && _error == null; | |
public bool HasObservers => _refCount > 0; |
OlderNewer