Skip to content

Instantly share code, notes, and snippets.

View jezzsantos's full-sized avatar
💫
Open to Work

Jezz Santos jezzsantos

💫
Open to Work
View GitHub Profile
@jezzsantos
jezzsantos / ApiClient.cs
Created June 26, 2021 09:03
Availabilities.IntegrationTests
using ServiceStack;
namespace Availabilities.Api.IntegrationTests
{
public static class ApiClient
{
public static JsonServiceClient Create(string serviceUrl)
{
return new JsonServiceClient($"{serviceUrl.WithTrailingSlash()}api/");
}
@jezzsantos
jezzsantos / ApiClient.cs
Created June 26, 2021 04:20
Availabilities.IntegrationTests
using ServiceStack;
namespace Availabilities.Api.IntegrationTests
{
public static class ApiClient
{
public static JsonServiceClient Create(string serviceUrl)
{
return new JsonServiceClient($"{serviceUrl.WithTrailingSlash()}api/");
}
$resourceGroup = "hourfleet-tenants-ause"
$storageAccount = "hourfleettenant1"
$tableName = "useraccounts"
$saContext = (Get-AzureRmStorageAccount -ResourceGroupName $resourceGroup -Name $storageAccount).Context
#Next line is for 'classic' storage accounts
#$saContext = (New-AzureStorageContext -StorageAccountName $storageAccount -StorageAccountKey "PUTSTPORAGEACCOUNTKEYHERE").Context
$userAccountsTable = Get-AzureStorageTable -Name "useraccounts" -Context $saContext
$verificationsTable = Get-AzureStorageTable -Name "verifications" -Context $saContext
$userProfilesTable = Get-AzureStorageTable -Name "userprofiles" -Context $saContext
@jezzsantos
jezzsantos / BufferedQueue.cs
Created July 14, 2016 09:39
A Serilog.ILogEventSink that buffers the input in an in a bounded memory queue, and has a thread pool thread write the event to another sink.
using System;
using System.Threading;
using System.Threading.Tasks.Dataflow;
using ServiceStack;
namespace Gene.Diagnostics
{
/// <summary>
/// Provides a continous buffered producer/consumer queue (of specified buffer size) of the specified
/// <see cref="TMessage" />.
@jezzsantos
jezzsantos / BlackListedPropertyRemover.cs
Last active March 17, 2021 16:48
A serilog.net Enricher (with unit tests) that removes any properties of any structured value that are named by a black-list (partially or wholly case-sensitive).
using System.Collections.Generic;
using System.Linq;
using Serilog.Core;
using Serilog.Events;
namespace Gene.Diagnostics
{
/// <summary>
/// Defines a <see cref="ILogEventEnricher" /> that removes properties that match (wholey or partially case-sensitive) those in a black-list
/// </summary>