Skip to content

Instantly share code, notes, and snippets.

Alexander Trauzzi atrauzzi

Block or report user

Report or block atrauzzi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@atrauzzi
atrauzzi / Spawn.ts
Last active Sep 21, 2017
A utility to spawn commands using C# from edgejs in nodejs & TypeScript!
View Spawn.ts
// tslint:disable-next-line:no-var-requires
const edge = require("edge-js");
export interface Options {
fileName: string;
arguments?: string;
}
@atrauzzi
atrauzzi / deploy.sh
Last active Mar 11, 2017
🖋 Azure App Service deployment using bash and CURL
View deploy.sh
#!/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 / stuff.md
Last active Feb 20, 2017
🖋 - This should be a blog type.
View stuff.md

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 / cors.xml
Last active Apr 1, 2016
Granting your app access to S3
View cors.xml
<?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 / ApplicationDbContext.cs
Last active Sep 2, 2017
Using Postgres on Docker with EF7 and ASP.NET 5
View ApplicationDbContext.cs
namespace App {
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Data.Entity;
public class ApplicationDbContext : IdentityDbContext {
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {
@atrauzzi
atrauzzi / Program.cs
Created Dec 14, 2015
Advent of Code - Day 3 Part 1
View Program.cs
namespace Day3Part1 {
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
public static class Extensions {
@atrauzzi
atrauzzi / Dockerfile
Last active Nov 13, 2015
Run ASP.NET 5 applications on Google App Engine
View Dockerfile
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 / output.json
Created Nov 6, 2015
Inspect output for docker/compose #2301
View output.json
[
{
"Id": "7b8796b753d4701fcc12657fcbafa467c4cca5d8a7b18163a52829157b91f44f",
"Created": "2015-11-06T11:28:42.002941793Z",
"Path": "/docker-entrypoint.sh",
"Args": [
"elasticsearch"
],
"State": {
"Status": "created",
@atrauzzi
atrauzzi / Controller Sample.php
Last active Nov 11, 2015
Some of the things I love about Laravel 5 request handling.
View Controller Sample.php
<?php
use Illuminate\Routing\Controller;
use Illuminate\Foundation\Http\FormRequest;
//
use Illuminate\Http\Request;
/**
*
* Keep in mind, this uses a lot of idiomatic PHP. Any variable can be used as a nullable type and null
@atrauzzi
atrauzzi / pre-run.sh
Created Feb 16, 2015
Docker pre-run workaround for inheriting host's .ssh.
View pre-run.sh
#!/bin/sh
echo "Configuring SSH Environment for `whoami`..."
rm -rf ~/.ssh
cp -r ~/.host-ssh ~/.ssh
chown -R root:root ~/.ssh
chmod -R 400 ~/.ssh
"$@"
You can’t perform that action at this time.