Skip to content

Instantly share code, notes, and snippets.

View damianh's full-sized avatar
💥

Damian Hickey damianh

💥
View GitHub Profile
@thefringeninja
thefringeninja / Dockerfile
Last active April 24, 2019 14:56
Dockerized Pulumi
FROM pulumi/pulumi as build
RUN curl -L https://storage.googleapis.com/kubernetes-helm/helm-v2.13.1-linux-amd64.tar.gz | tar xvz \
&& mv linux-amd64/helm /usr/bin/helm \
&& chmod +x /usr/bin/helm \
&& rm -rf linux-amd64
ARG UID=1000
ARG GID=1000
RUN groupadd -g $GID -o user \
@cameronfletcher
cameronfletcher / _ironclad.settings
Last active April 3, 2019 07:44
Ironclad configuration options
appsettings.json Environment variables Command line arguments Comments
================ ===================== ====================== ========
server { Mandatory section.
database SERVER__DATABASE --server:database (secret) Mandatory. Specifies the connection string for the database.
issuer_uri SERVER__ISSUER_URI --server:issuer_uri Optional. Specifies the issuer URI to use for ironclad. Defaults to the URI from the request.
respect_x_forwarded_for_headers SERVER__RESPECT_X_FORWARDED_FOR_HEADERS --server:respect_x_forwarded_for_headers
@yreynhout
yreynhout / EventStoreCollection.cs
Last active May 9, 2020 20:45
Recipe for an EventStoreFixture using Docker.DotNet
using Xunit;
namespace TheDukesOfDocker
{
[CollectionDefinition(nameof(EventStoreCollection))]
public class EventStoreCollection : ICollectionFixture<EventStoreFixture>
{
}
}
@yvanin
yvanin / AwsV4SignatureCalculator.cs
Last active March 5, 2024 20:37
This C# code calculates a request signature using Version 4 signing process. It was developed for and tested on Amazon SQS requests, so it does not cover every scenario for the other services, e.g. multipart uploads are not supported. Nevertheless, it's simple and independent single class that can be easily embedded into other projects. .NET Fra…
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Globalization;
using System.Linq;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
namespace AwsV4SignatureCalculator
using System;
namespace SomeUnit {
public class AssertHelper {
public static AssertHelper Assert { get; } = new AssertHelper();
}
}
namespace SomeUnit.Extensions {
public static class AssertExtensions {
@damianh
damianh / Rename-Project.psm1
Last active May 25, 2018 23:10
Renames a csproj - Project Name, DirectoryName, AssemblyName and references to the project
# Works for me. You may need to tweak it. Stick it in your powershell profile FTW
function Rename-Project
{
# designed to run from the solution directory where the project is a child directory
param(
[string]$projectName=$(throw "projectName required."),
[string]$newProjectName=$(throw "newProjectName required.")
)
@richardkundl
richardkundl / BloomFilter.cs
Created January 7, 2014 14:29
Bloom filter implementation in c#.
namespace BloomFilter
{
using System;
using System.Collections;
/// <summary>
/// Bloom filter.
/// </summary>
/// <typeparam name="T">Item type </typeparam>
public class Filter<T>
@dotMorten
dotMorten / HttpGZipClientHandler.cs
Last active May 8, 2018 19:38
GZip support for PCL HttpClient. Create HttpClient using: HttpClient client = new HttpClient(new HttpGZipClientHandler());
using System.IO;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;
namespace SharpGIS.Http
{
public class HttpGZipClientHandler : HttpClientHandler
{
@daanl
daanl / gist:4756825
Created February 11, 2013 19:17
Dynamic translation service
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Dynamic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication5