Skip to content

Instantly share code, notes, and snippets.

View polterguy's full-sized avatar

AINIRO.IO polterguy

View GitHub Profile
@polterguy
polterguy / HttpClient.cs
Created May 10, 2019 12:59
A C# class to easily invoke HTTP REST invocations with one line of code
/*
* Usage ...
* var foo = new SomeType { /*.Decorate instance here ... */ };
* var result = await Client.PostAsync<SomeType>("https://some-url.com/api", foo);
*/
using System;
using System.Net.Http;
using System.Threading.Tasks;
@polterguy
polterguy / gist:f16f74fdffae67f762715ba5d60f9177
Last active February 14, 2021 21:07
magic-docker-compose-example.yml
version: "3.3"
services:
db:
image: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: ThisIsNotAGoodPassword
volumes:
@polterguy
polterguy / gist:5312b16f7abc9326038965d79c2f4820
Last active February 21, 2021 08:06
Angular login dialogue
<h1 mat-dialog-title>Login</h1>
<div mat-dialog-content>
<mat-form-field>
<mat-label>Username</mat-label>
<input
matInput
[(ngModel)]="username">