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 / DockerCleanupScripts.md
Last active February 23, 2025 17:40
Docker Cleanup Scripts

Docker - How to cleanup (unused) resources

Cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@spboyer
spboyer / azuredeploy.json
Created March 28, 2017 23:00
ARM template for Azure function CI/CD to github
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"appName": {
"type": "string"
},
"location": {
"type": "string",
"allowedValues": [
@spboyer
spboyer / swagger-multiple-locations.csproj
Created March 28, 2017 17:11
Multiple destinations for Documentation File in ASP.NET Core - Swagger file
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DocumentationFile>bin\Debug\netcoreapp1.1\copydocfile-example.xml</DocumentationFile>
<!-- creates the file in the root of the project -->
<DocumentationFile>copydocfile-example.xml</DocumentationFile>
<!-- Creates the file in a "docs" folder -->
<DocumentationFile>docs\copydocfile-example.xml</DocumentationFile>
</PropertyGroup>
@spboyer
spboyer / snippet.csproj
Created March 28, 2017 17:06
Documentation File snippet for ASP.NET Core Swagger file include
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<ItemGroup>
<DocFile Include="bin\$(Configuration)\$(TargetFramework)\*.xml" />
</ItemGroup>
<Copy SourceFiles="@(DocFile)" DestinationFolder="$(PublishDir)" SkipUnchangedFiles="false" />
</Target>
<!-- Added by Visual Studio, Visual Studio for Mac, or hand code in other IDE -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DocumentationFile>bin\Debug\netcoreapp1.1\copydocfile-example.xml</DocumentationFile>

Intro - Finding APIs, no documentation, building APIs, test harnesesses etc Swagger - specification no referred or renamed to OpenAPI Spec. Restful interface to documetation of your APIs. Swashbuckle - OSS implementation for ASP.NET / Ahoy => ASP.NET Core on github

ASP.NET Docs page - https://docs.microsoft.com/en-us/aspnet/core/tutorials/web-api-help-pages-using-swagger

We are going to use VS for Mac! Wait what?? (can have some discussion here)

Let's do this..

@spboyer
spboyer / console-output.txt
Last active December 2, 2016 16:51
Create a ASP.NET Core web application using the dotnet-cli and push to Azure using the azure-cli
Counting objects: 84, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (78/78), done.
Writing objects: 100% (84/84), 551.03 KiB | 0 bytes/s, done.
Total 84 (delta 5), reused 0 (delta 0)
remote: Updating branch 'master'.
remote: Updating submodules.
remote: Preparing deployment for commit id '59c9c966b5'.
remote: Generating deployment script.
remote: Project file path: .\preview3web.csproj
@spboyer
spboyer / angular-cli-docker.md
Created November 12, 2016 18:06
angular cli docker stuff

Docker Deploy - Design

Abstract

Add convenience for users to containerize and deploy their Angular application via Docker.

Provide tasks for common Docker workflows:

  • Generate starter Dockerfile and docker-compose.yml files.
  • Build and Push an Angular app image to a Docker Registry.
@spboyer
spboyer / index.js
Created April 9, 2016 01:26
ExpressJS AngularJS Static Server
var express = require('express'),
path = require('path'),
fs = require('fs');
var app = express();
var staticRoot = __dirname + '/';
app.set('port', (process.env.PORT || 3000));
app.use(express.static(staticRoot));
@spboyer
spboyer / docker.sh
Last active December 17, 2015 14:26
Docker Scripts
#remove all stopped containers
docker rm $(docker ps -a -q)
#remove all untagged images
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
#Kill all running containers
docker kill $(docker ps -q)
#Delete all stopped containers (including data-only containers)
@spboyer
spboyer / travis-build-csharp.yml
Created December 1, 2015 20:20
Travis example for building a csharp solution
language: csharp
solution: myapp.sln
sudo: false
mono:
- latest
install:
- curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh
- dnvm upgrade
- dnu restore
os: