Skip to content

Instantly share code, notes, and snippets.

View jonasbg's full-sized avatar
🏠
Working from home

Jonasbg jonasbg

🏠
Working from home
View GitHub Profile
@jonasbg
jonasbg / Dockerfile
Created October 24, 2018 09:04
Build Dockerfile for legacy ASP.NET project
# escape=`
FROM microsoft/dotnet-framework:4.7.2-sdk-windowsservercore-1803
ENV SOLUTION_NAME Solutionfile.sln
ENV PUBLISH_PROFILE Release
RUN mkdir C:\api
WORKDIR C:\\api
COPY . .
RUN nuget restore %SOLUTION_NAME%
@jonasbg
jonasbg / Dockerfile
Last active October 29, 2018 12:02
Dockerfile for windows IIS setup for legacy ASP.NET apps - with url-rewrite
# escape=`
FROM microsoft/dotnet-framework:4.7.2-runtime
SHELL ["powershell", "-Command","$ErrorActionPreference = 'Stop';$ProgressPreference = 'SilentlyContinue';"]
RUN Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' `
-Name ServerPriorityTimeLimit -Value 0 -Type DWord
RUN Add-WindowsFeature Web-server, `
NET-Framework-45-ASPNET, Web-Asp-Net45; `
Remove-Website -Name 'Default Web Site'
@jonasbg
jonasbg / gist:536919c1af14de56e2783e36e7825c05
Created November 1, 2018 09:13
Powershell - delete all Obj and Bin folders
Get-ChildItem .\ -include bin,obj -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
@jonasbg
jonasbg / .dockerignore
Created February 26, 2019 12:24
Dockerfile - Angular with ng serve
node_modules
.git
@jonasbg
jonasbg / Dockerfile
Last active November 19, 2019 08:45
Dockerfile build Resharper Command Line tool
# USE LINUX DISTRO
FROM ubuntu:latest AS download
RUN apt-get update
RUN apt-get install -y curl wget unzip
WORKDIR /download
RUN curl -L -o CommandTools.zip https://download.jetbrains.com/resharper/ReSharperUltimate.2019.2.2/JetBrains.ReSharper.CommandLineTools.Unix.2019.2.2.zip
RUN unzip CommandTools.zip && rm CommandTools.zip
#FROM mono:latest AS tool
FROM mcr.microsoft.com/dotnet/core/sdk:3.0.100 AS tool
@jonasbg
jonasbg / timelapse.sh
Created June 26, 2020 18:02 — forked from claygregory/timelapse.sh
4K timelapse from photos using ffmpeg
#!/bin/bash
if [[ -z "$1" || -z "$2" ]]; then
echo "Usage: timelapse input/*.jpg output.mp4";
exit;
fi
mkdir "./working"
output="${!#}"
@jonasbg
jonasbg / index.sh
Created June 26, 2020 18:02 — forked from max-mapper/index.sh
4k timelapse ffmpeg
ffmpeg -r 25 -pattern_type glob -i '*.jpg' -vf scale=3840:-1 -vcodec libx264 -crf 25 OUTPUT.MP4
@jonasbg
jonasbg / gist:72616f5476f1414076b84a6abeb48d96
Created July 31, 2022 13:27
Darktable parallel RAW conversion
find . -type d | parallel --jobs 6 /Applications/darktable.app/Contents/MacOS/darktable-cli "{1}" /PATH_TO_OUTPUT_FOLDER --core --library ":memory:" --configdir "/tmp/{/.}/"
@jonasbg
jonasbg / cert-manager-test.sh
Created March 22, 2023 23:40 — forked from jakexks/cert-manager-test.sh
Cert-manager selfsigned as cluster issuer
#!/usr/bin/env bash
set -ex
export TEST_CLUSTER_NAME=quick-test
export CERT_MANAGER_VERSION=v1.3.1
export KIND_IMAGE=kindest/node:v1.20.2
# Create test cluster
echo "Creating test cluster..."
kind create cluster --name="$TEST_CLUSTER_NAME" --image="$KIND_IMAGE"
until kubectl --timeout=120s wait --for=condition=Ready pods --all --namespace kube-system; do sleep 1; done