Skip to content

Instantly share code, notes, and snippets.

View spboyer's full-sized avatar
💭
Coding, contributing, supporting, mentoring, learning, all of the right verbs

Shayne Boyer spboyer

💭
Coding, contributing, supporting, mentoring, learning, all of the right verbs
View GitHub Profile
@spboyer
spboyer / cdn_cache_thing.cs
Created August 11, 2018 15:45
serverless-cdn script
using System;
using System.IO;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.WindowsAzure.Storage.Blob;
namespace Workshop.Function
@spboyer
spboyer / nugetfeed.js
Created August 9, 2018 18:32
dotnet new azure function templates snippets
"2.3.3": {
"Microsoft.NET.Sdk.Functions": "1.0.14",
"cli": "https://functionscdn.azureedge.net/public/2.0.1-beta.34/Azure.Functions.Cli.win-x86.2.0.1-beta.34.zip",
"nodeVersion": "8.11.1",
"localEntryPoint": "func.exe",
"itemTemplates": "https://www.myget.org/F/azure-appservice/api/v2/package/Azure.Functions.Templates/2.0.0-beta-10224",
"projectTemplates": "https://www.myget.org/F/azure-appservice/api/v2/package/Microsoft.AzureFunctions.ProjectTemplates/2.0.0-beta-10224",
"templateApiZip": "https://functionscdn.azureedge.net/public/TemplatesApi/2.0.0-beta-10224.zip",
"sha2": "4A2B808E86AE4C4DEF38A2A14270D19EC384648AD1FDF635921A64F609D41098",
"FUNCTIONS_EXTENSION_VERSION": "beta",
\\\ ,
\ `|
) ( .-""-.
| | /_ { '.
| | (/ `\ } )
| | ^/ ^`} {
\ \ \= ( { )
\ \ '-, { {{
\ \_.' ) } )
\.-' ( (
.--------------------------------------------.
|~''--..__ |
| ~~''--..__ |
| 88 aa _ ~~''--..__ |
| 88 88 d88 oo.. ~~''--._ |
| 88a88 88 8b 88"8b 88oo | |
| 88 88 88a88 88 88 88 88 88 oo | |
| 88 88 88 88 88aP" 88 8P 88 88 | |
| " "9 88 88 88 88P" YP" | |
| " "9 98 88 88 | |
@spboyer
spboyer / post.md
Last active May 16, 2018 21:01
Why Containers?

Why should we care about using containers for development

There have probably been more than one time in your development career where you've spent a few hours troubleshooting an issue only to find out it was a dependency or versions issue right?

Environments varying from one to next, outdated components and setting up development machines are frustrations we can all do without.

Some of these issues we've solved with VMs, but managing the entire machine and under utilizing them for each enviroment is costly. This is where containers have come to solve many challenges.

Why Containers

@spboyer
spboyer / output.md
Created May 2, 2018 18:20
ASP.NET Core 2.1 - Docker HTTPS Kestrel Can't Start
$ docker-compose up                                                                                                                                            ✔  6490  13:46:10
Recreating namesweb_namesweb_1 ... done
Attaching to namesweb_namesweb_1
namesweb_1  | info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
namesweb_1  |       User profile is available. Using '/root/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
namesweb_1  | info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[58]
namesweb_1  |       Creating key {85e4bc76-7e37-4d9b-98d7-487f7a9cd12e} with creation date 2018-05-02 17:48:29Z, activation date 2018-05-02 17:48:29Z, and expiration date 2018-07-31 17:48:29Z.
namesweb_1  | warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
namesweb_1  |       No XML encryptor configured. Key {85e4bc76-7e37-4d9b-98d7-487f7a9cd12e} may be persisted to storage in unencrypted form.
@spboyer
spboyer / simple.yml
Created December 8, 2017 17:52
Web app and redis container kubernetes file example.
apiVersion: v1
items:
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-simple.yml -o simple.yml
kompose.version: 1.1.0 (36652f6)
creationTimestamp: null
labels:
@spboyer
spboyer / gitclone.sh
Created November 8, 2017 20:36
GitClone
# Git clone shortcut, assumes spboyer by default
# usage: clone <user> <repo name>
function clone {
# customize username to your own
local username="spboyer"
local url=$1;
local repo=$2;
if [[ ${url:0:4} == 'http' || ${url:0:3} == 'git' ]]
@spboyer
spboyer / logs.txt
Created October 12, 2017 21:57
windows container on ACI
shayne@Azure:~$ az container show -n magic8ball -g wincontainers
{
"containers": [
{
"command": null,
"environmentVariables": [],
"image": "mvcrandomanswergeneratortest.azurecr.io/mvcrandomanswergenerator:20171012072842",
"instanceView": {
"currentState": {
"detailStatus": "",