Skip to content

Instantly share code, notes, and snippets.

😎
Coding

Georg Dangl GeorgDangl

😎
Coding
Block or report user

Report or block GeorgDangl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View DatabaseContext.cs
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
if (Database.ProviderName == "Microsoft.EntityFrameworkCore.Sqlite")
{
// SQLite does not have proper support for DateTimeOffset via Entity Framework Core, see the limitations
// here: https://docs.microsoft.com/en-us/ef/core/providers/sqlite/limitations#query-limitations
// To work around this, when the Sqlite database provider is used, all model properties of type DateTimeOffset
// use the DateTimeOffsetToBinaryConverter
@GeorgDangl
GeorgDangl / Build.cs
Last active Jul 26, 2019
Perfoming End-to-End Tests for a .NET Core Web API with an Angular Frontend in Docker with Jenkins
View Build.cs
Target E2ETests => _ => _
.DependsOn(BuildDocker)
.DependsOn(Clean)
.Executes(async () =>
{
IProcess dockerComposeProcess = null;
// Start the docker environment in a non-blocking way
var dockerComposeUpTask = Task.Run(() =>
{
dockerComposeProcess = ProcessTasks.StartProcess("docker-compose", "up");
@GeorgDangl
GeorgDangl / ExportToOenorm.cs
Last active May 29, 2019
Convert between German GAEB files and Austrian ÖNorm 2063 with the libraries by Dangl IT GmbH, see https://www.dangl-it.com/articles/convert-between-oenorm-2063-and-gaeb-files-with-danglava-dangloenorm-and-danglgaeb/
View ExportToOenorm.cs
private async Task TransformToOenormAsync()
{
var convertedProject = Dangl.Oenorm.Converter.ConvertToOenorm(_readProject, OenormDestinationType.LV2015);
using (var oenormStream = Dangl.Oenorm.Writer.OenormWriter.GetStream(convertedProject))
{
var outputPath = Path.GetFullPath(_options.OutputFilePath);
using (var fileStream = File.Create(outputPath))
{
await oenormStream.CopyToAsync(fileStream);
}
View CreateGaebFile.cpp
Console::WriteLine(L"Creating new GAEB file:");
GaebTargetType targetType = GaebTargetType::GaebXml;
Project^ projectToExport = gcnew Project();
ServiceSpecification^ servSpec = gcnew ServiceSpecification();
servSpec->ExchangePhase = ExchangePhase::Grant;
projectToExport->ServiceSpecifications->Add(servSpec);
Position^ position = gcnew Position();
position->ShortText = "C++ Position";
position->ItemNumber->StringRepresentation = "01";
View PublishElectronApp.cs
[PathExecutable("electronize")] readonly Tool ElectronNET;
Target PublishElectronApp => _ => _
.DependsOn(Clean)
.DependsOn(GenerateVersion)
.Requires(() => DocuBaseUrl)
.Requires(() => DocuApiKey)
.Executes(async () =>
{
// Electron Build
@GeorgDangl
GeorgDangl / GAEB.xml
Last active Jan 16, 2019
Integrating BIM and IFC references in GAEB data
View GAEB.xml
<?xml version="1.0" encoding="utf-8"?>
<!--Created with Dangl GAEB Tool, Copyright 2013 - 2019 Dangl IT GmbH, www.dangl-it.com, Version 1.6.2 (Built: 15.01.2019 19:00)-->
<GAEB xmlns="http://www.gaeb.de/GAEB_DA_XML/DA83/3.2">
<GAEBInfo>
<Version>3.2</Version>
<VersDate>2013-10</VersDate>
<Date>2019-01-16</Date>
<Time>21:18:22</Time>
<ProgSystem>Dangl GAEB Tool - www.dangl-it.com - Version 1.6.2</ProgSystem>
<ProgName>Dangl.AVA.Converter www.dangl-it.com V2.0.2 ©2019</ProgName>
@GeorgDangl
GeorgDangl / ClientDependency.config
Last active Jan 11, 2019
Caching bundled and minified JavaScript and CSS in the free tier on CloudFlare with the ClientDependency package in Umbraco and other IIS-hosted websites, see https://blog.dangl.me/archive/caching-bundled-and-minified-css-and-javascript-with-the-wrong-file-extension-in-the-free-tier-on-cloudflare-with-umbraco/
View ClientDependency.config
<mvc defaultRenderer="StandardRenderer">
<renderers>
<add name="StandardRenderer" type="Dangl.Blog.NonAxdDependenciesRenderer, Dangl.Blog" />
<add name="LazyLoadRenderer" type="ClientDependency.Core.FileRegistration.Providers.LazyLoadRenderer, ClientDependency.Core" />
</renderers>
</mvc>
@GeorgDangl
GeorgDangl / convert_to_ava.py
Last active Jan 8, 2019
AVACloud Python Examples to work with GAEB files in Python - https://www.dangl-it.com
View convert_to_ava.py
# Configure OAuth2 access token for authorization: Dangl.Identity
configuration = avacloud_client_python.Configuration()
configuration.access_token = access_token
api_instance = avacloud_client_python.GaebConversionApi(avacloud_client_python.ApiClient(configuration))
gaeb_file = './GAEBXML_EN.X86' # File path to the input GAEB file
# First, the AVA Project is generated
try:
# Converts GAEB files to Dangl.AVA projects
View HttpStatusCode.cs
public enum HttpStatusCode
{
/* Excerpt from System.Net.HttpStatusCode */
RedirectKeepVerb = 307,
TemporaryRedirect = 307
}
@GeorgDangl
GeorgDangl / project.csproj
Created Nov 21, 2018
Use the new GeneratePathProperty in .NET SDK based csproj files
View project.csproj
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net471</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Content Include="$(PkgXbim_Geometry)\build\x64\Xbim.Geometry.Engine64.dll">
<Link>x64\Xbim.Geometry.Engine64.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
You can’t perform that action at this time.