Skip to content

Instantly share code, notes, and snippets.

View atrauzzi's full-sized avatar

Alexander Trauzzi atrauzzi

View GitHub Profile
@atrauzzi
atrauzzi / output.json
Created November 6, 2015 05:41
Inspect output for docker/compose #2301
[
{
"Id": "7b8796b753d4701fcc12657fcbafa467c4cca5d8a7b18163a52829157b91f44f",
"Created": "2015-11-06T11:28:42.002941793Z",
"Path": "/docker-entrypoint.sh",
"Args": [
"elasticsearch"
],
"State": {
"Status": "created",
@atrauzzi
atrauzzi / Dockerfile
Last active November 13, 2015 01:19
Run ASP.NET 5 applications on Google App Engine
FROM microsoft/aspnet:1.0.0-beta8-coreclr
COPY project.json /app/
WORKDIR /app
RUN ["dnu", "restore"]
COPY . /app
EXPOSE 8080
ENTRYPOINT ["dnx", "-p", "project.json", "web"]
@atrauzzi
atrauzzi / Program.cs
Created December 14, 2015 01:53
Advent of Code - Day 3 Part 1
namespace Day3Part1 {
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
public static class Extensions {
@atrauzzi
atrauzzi / ApplicationDbContext.cs
Last active September 2, 2017 21:44
Using Postgres on Docker with EF7 and ASP.NET 5
namespace App {
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Data.Entity;
public class ApplicationDbContext : IdentityDbContext {
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {
@atrauzzi
atrauzzi / cors.xml
Last active April 1, 2016 13:23
Granting your app access to S3
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
@atrauzzi
atrauzzi / stuff.md
Last active February 20, 2017 23:21
🖋 - This should be a blog type.

This is a 2nd level heading, do you enjoy it?

Any markdown file found inside of the gist will be used as the body of a blog post.

There might be opportunities to do cool things with attached files, but let's just call that a stretch.

Another second level heading

What's going on here?!

@atrauzzi
atrauzzi / deploy.sh
Last active July 9, 2020 08:06
🖋 Azure App Service deployment using bash and CURL
#!/bin/bash
NAME="some-convention-driven-name-usually-a-resource-group"
APP="your-app-name-ideally-another-convention"
DEPLOYMENT_PASSWORD=`az appservice web deployment list-site-credentials \
--resource-group ${NAME} \
--name ${APP} \
--query publishingPassword \
--output tsv`
@atrauzzi
atrauzzi / Spawn.ts
Last active September 21, 2017 15:35
A utility to spawn commands using C# from edgejs in nodejs & TypeScript!
// tslint:disable-next-line:no-var-requires
const edge = require("edge-js");
export interface Options {
fileName: string;
arguments?: string;
}
@atrauzzi
atrauzzi / google-cloud-run-get-project-hash.sh
Last active May 25, 2023 00:41
Google Cloud Run Get Project Hash
#!/bin/bash
PROJECT=${1:-"$(gcloud config get-value project)"}
REGION=${2:-"us-central1"}
IMAGE="hub.docker.com/_/nginx"
{
gcloud services enable "run.googleapis.com" --project="${PROJECT}"
gcloud auth configure-docker --quiet