Skip to content

Instantly share code, notes, and snippets.

View QuadmanSWE's full-sized avatar

David Söderlund QuadmanSWE

View GitHub Profile
@QuadmanSWE
QuadmanSWE / remove-user-objects-from-master.sql
Created November 23, 2022 07:26
remove all user objects from master
USE MASTER
GO
SET NOCOUNT ON
GO
SELECT N'ALTER TABLE [' + schema_name([schema_id]) + N'].[' + object_name(parent_object_id) + N'] DROP ' + [name] command from sys.objects where [type] = 'F' AND is_ms_shipped <> 1
UNION ALL
SELECT 'GO' command
UNION ALL
@QuadmanSWE
QuadmanSWE / dotnet.dockerfile
Created March 30, 2022 21:52
multi stage docker builds of web apps
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine3.15@sha256:fe38d256de00db2594c5d3949df4d06a7801ff03bbbdf084d2ce5f0a2e7c747b AS builder
WORKDIR /app
COPY *.csproj .
RUN dotnet restore
COPY . .
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine3.15@sha256:eaab307e3325a298998647d6f2916b68d5445ffbbd470d053808786427bc6456 as bin
WORKDIR /app