Skip to content

Instantly share code, notes, and snippets.

View dasMulli's full-sized avatar

Martin Andreas Ullrich dasMulli

  • Tietoevry Austria
  • Vienna, Austria
View GitHub Profile
@dasMulli
dasMulli / Directory.Build.targets
Last active February 21, 2022 23:44
CI build script for a mvc + Webpack SPA app
<Project>
<Target Name="NpmInstall" Condition="Exists('package.json')">
<Exec Command="npm install" />
</Target>
<Target Name="NpmCiTest" Condition="Exists('package.json')">
<Exec Command="npm run ci-test" />
<ItemGroup Condition="'$(TestResultsOutputPath)' != ''">
<TestResultFiles Include="obj\karma-testresults\**" />
@dasMulli
dasMulli / Directory.Build.targets
Last active January 18, 2021 16:55
Allow `dotnet test` to be run from solution directory
<Project>
<Target Name="VSTestIfTestProject">
<CallTarget Targets="VSTest" Condition="'$(IsTestProject)' == 'true'" />
</Target>
</Project>
@dasMulli
dasMulli / webpack.config.js
Created December 11, 2017 20:41
Angular 5 webpack for SpaServices 2.0.0
const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin;
module.exports = (env) => {
// Configuration in common to both client-side and server-side bundles
const isDevBuild = !(env && env.prod);
const sharedConfig = {
@dasMulli
dasMulli / update.targets.xml
Created February 3, 2018 10:20
Update all package references
<Project>
<Target Name="_CollectPackagesToUpdate" Returns="@(_PackageToUpdate)">
<ItemGroup>
<_PackageToUpdate Include="@(PackageReference)" Condition="'%(PackageReference.IsImplicitlyDefined)' != 'true' and '%(PackageReference.DoNotUpdate)' != 'true'"
TargetFramework="$(TargetFramework)" />
</ItemGroup>
</Target>
<Target Name="_UpdatePackagesSingleTfm" DependsOnTargets="_CollectPackagesToUpdate" Condition="'$(TargetFramework)' != '' and '$(TargetFrameworks)' == ''">
@dasMulli
dasMulli / Readme.md
Last active December 12, 2018 19:52
What's new in .NET Core 3.0?

What's new in .NET Core 3.0?

Talk for the Vienna .NET User Group Meetup on Dec. 11th 2018.

License: MIT, based on dotnet-presentations/home presentations

public class CountTruesBenchmarks
{
private readonly bool[] boolArray;
public CountTruesBenchmarks()
{
var rnd = new Random(42);
boolArray = Enumerable.Range(0, 500).Select(_ => rnd.NextBoolean()).ToArray();
}
@dasMulli
dasMulli / MemoryLeakWorkaroundViewCell.cs
Created June 7, 2019 19:41
Xamarin.Forms UWP ListView memory leak workaround
using Xamarin.Forms;
public class MemoryLeakWorkaroundViewCell : ViewCell
{
protected override void OnDisappearing()
{
base.OnDisappearing();
base.Parent = null;
}
}
@dasMulli
dasMulli / HardwareIntrinsics-DotNetMeetupVienna.pptx
Last active August 23, 2019 08:25
Hardware Intrinsics Talk for .NET Meetup Vienna August 2019
This file has been truncated, but you can view the full file.
@dasMulli
dasMulli / profiles.json
Created September 16, 2019 13:22
Windows Terminal config with VS 2019 Devekioer Command Prompt / PowerShell
{
"globals" :
{
"alwaysShowTabs" : true,
"defaultProfile" : "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"initialCols" : 160,
"initialRows" : 40,
"keybindings" :
[
{
@dasMulli
dasMulli / ns.cmd
Created February 25, 2020 13:32
Kubernetes namespace switching utility for Windows
@echo off
if "%~1"=="" GOTO PRINTNAMESPACE
: SETNAMESPACE
kubectl config set-context --current --namespace="%~1"
: PRINTNAMESPACE