Skip to content

Instantly share code, notes, and snippets.

João Bragança thefringeninja

View GitHub Profile
@thefringeninja
thefringeninja / Dockerfile
Last active Apr 24, 2019
Dockerized Pulumi
View Dockerfile
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 \
@thefringeninja
thefringeninja / Dockerfile
Created Jul 4, 2018
Sql Stream Store Docker Compose Example
View Dockerfile
FROM nginx:1.15.0-alpine
COPY ./nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
ENTRYPOINT ["nginx", "-g", "daemon off;"]
@thefringeninja
thefringeninja / RavenDatabaseManager.cs
Created Dec 8, 2017
Run Raven Tests in Ur Docker Container
View RavenDatabaseManager.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Docker.DotNet;
using Docker.DotNet.Models;
using Raven.Client.Documents;
using Raven.Client.Documents.Session;
using Raven.Client.Exceptions;
@thefringeninja
thefringeninja / messages.csx
Created Oct 27, 2017
Generate Message Contracts via CSX Script
View messages.csx
#! "netcoreapp1.1"
#r "nuget:NetStandard.Library,1.6.1"
#r "nuget:Dotnet.Script.Core,0.13.0-beta"
#r "nuget:SharpYaml,1.6.1"
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
View CustomerBootstrapper.cs
internal class CustomerBootstrapper
: DefaultBootstrapper
{
private readonly ICustomerRepository _customers;
public CustomerBootstrapper(ICustomerRepository customers)
{
if (customers == null)
{
throw new ArgumentNullException(nameof(customers));
View aws-api-gateway-form-to-json.ftl
## convert HTML POST data or HTTP GET query string to JSON
## get the raw post data from the AWS built-in variable and give it a nicer name
#if ($context.httpMethod == "POST")
#set($rawAPIData = $input.path("$"))
#elseif ($context.httpMethod == "GET")
#set($rawAPIData = $input.params().querystring)
#set($rawAPIData = $rawAPIData.toString())
#set($rawAPIDataLength = $rawAPIData.length() - 1)
#set($rawAPIData = $rawAPIData.substring(1, $rawAPIDataLength))
@thefringeninja
thefringeninja / build.ps1
Last active May 8, 2017 — forked from Structed/build.ps1
build.ps1 for Cake 0.18
View build.ps1
##########################################################################
# This is the Cake bootstrapper script for PowerShell.
# This file was downloaded from https://github.com/cake-build/resources
# Feel free to change this file to fit your needs.
##########################################################################
<#
.SYNOPSIS
This is a Powershell script to bootstrap a Cake build.
View EnterpriseServiceBus.babel.js
class Bus {
constructor() {
this.handlers = {};
}
subscribe(type, handler) {
this.handlers[type] = (this.handlers[type] || [])
.concat(handler);
}
View gist:f528545f88fd1ec6a24a
public interface IHttpMessageSerializer
{
void Serialize(HttpResponseMessage response, Stream stream);
void Serialize(HttpRequestMessage request, Stream stream);
HttpResponseMessage DeserializeToResponse(Stream stream);
HttpRequestMessage DeserializeToRequest(Stream stream);
}
public class MessageContentHttpMessageSerializer : IHttpMessageSerializer
@thefringeninja
thefringeninja / plz.cs
Last active Aug 29, 2015
¯\_(ツ)_/¯
View plz.cs
public static class RavenDocumentStore
{
static RavenDocumentStore()
{
using (Create())
{ }
}
private static Type FindAssemblyLoaderType<T>()
{
return (from type in typeof(T).Assembly.GetTypes()
You can’t perform that action at this time.