Skip to content

Instantly share code, notes, and snippets.

View cilliemalan's full-sized avatar

Cillié Malan cilliemalan

View GitHub Profile

OAuth server-server authentication

In order to communicate to a web service that has OAuth authentication, one may use the following procedures. Note that this is only for server to server communication on a service account. This is not for making calls on behalf of a client. So scopes and claims are typically not relevant in this context.

Authentication happens in two steps:

  • Getting a token
  • Making calls with that token
@cilliemalan
cilliemalan / Coffee.md
Last active June 1, 2017 11:39
Rabbit Coffee Etiquette

Rabbit Coffee Etiquette

  • The Bottomless Pot—Whenever someone drinks the last Cup, he or she shall be held liable for making the next brew without delay.
  • Honour the Line—When one seeks brew but the elixir is not yet ready, the Cup shall be placed in the Line. The line shall be respected at all times. When the brew is ready the Cups in the line shall receive a full measure of bitter brew before those who come thereafter.
  • Four spoons—Four not excessively but nonetheless unmistakably heaped spoons. Weak coffee cannot be tolerated.
  • Sweet Italian—None but the timeless Sweet Italian Blend may pervade the percolator. The machine shall not be defiled by a lesser brew.
  • Always Hot—No brewed pot shall be allowed to cool. Turn on the top burner when placing a pot there.
  • Separation of the Stirrers—The weak spoon shall not share a receptacle with the mighty one. (put the milk spoon in the milk spoon holder and the non-milk spoon in the other one).
  • The Cup is Sacred—Each tru
@cilliemalan
cilliemalan / Server.md
Last active September 9, 2016 14:55
Creating ASP.Net Web API /w C# client

How to make an API Server

Step 1: New Project

Go to File -> New Project And create a Web Project:

img

Select Web API

img

@cilliemalan
cilliemalan / Startup.Security.cs
Created July 14, 2016 08:49
A better load balancer HTTPS redirect
using Owin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Whatevs
{
@cilliemalan
cilliemalan / minecraft.sh
Last active May 30, 2016 07:45
MSM init script for amazon linux
#!/bin/bash
# My script for provisioning a minecraft server
#
# wget -O - https://git.io/vrQol | bash
sudo yum -y update
# Download the default config file, update the user ID, and also add the -server switch which the MSM guys omitted\
sudo wget http://git.io/6eiCSg -O /etc/msm.conf