Skip to content

Instantly share code, notes, and snippets.

Martin Andreas Ullrich dasMulli

Block or report user

Report or block dasMulli

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
@dasMulli
dasMulli / MemoryLeakWorkaroundViewCell.cs
Created Jun 7, 2019
Xamarin.Forms UWP ListView memory leak workaround
View MemoryLeakWorkaroundViewCell.cs
using Xamarin.Forms;
public class MemoryLeakWorkaroundViewCell : ViewCell
{
protected override void OnDisappearing()
{
base.OnDisappearing();
base.Parent = null;
}
}
View CountTruesBenchmark.cs
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 / Readme.md
Last active Dec 12, 2018
What's new in .NET Core 3.0?
View Readme.md

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

@dasMulli
dasMulli / update.targets.xml
Created Feb 3, 2018
Update all package references
View update.targets.xml
<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 / webpack.config.js
Created Dec 11, 2017
Angular 5 webpack for SpaServices 2.0.0
View webpack.config.js
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 / Directory.Build.targets
Last active Jun 7, 2019
Allow `dotnet test` to be run from solution directory
View Directory.Build.targets
<Project>
<Target Name="VSTestIfTestProject">
<CallTarget Targets="VSTest" Condition="'$(IsTestProject)' == 'true'" />
</Target>
</Project>
@dasMulli
dasMulli / Directory.Build.targets
Last active Nov 9, 2018
CI build script for a mvc + Webpack SPA app
View Directory.Build.targets
<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 Sep 2, 2018
PublishAll target to publish for all frameworks and runtimes
View Directory.Build.targets
<Project>
<Target Name="PublishProjectIfFrameworkSet"
DependsOnTargets="Publish"
Condition=" '$(TargetFramework)' != '' " />
<Target Name="PublishProjectForAllRIDsIfTargetFrameworkSet" Condition=" '$(TargetFramework)' != '' and '$(RuntimeIdentifiers)' != '' and '$(RuntimeIdentifier)' == '' ">
<ItemGroup>
<_PublishRuntimeIdentifier Include="$(RuntimeIdentifiers)" />
</ItemGroup>
<MSBuild Projects="$(MSBuildProjectFile)" Targets="PublishAll" Properties="TargetFramework=$(TargetFramework);RuntimeIdentifier=%(_PublishRuntimeIdentifier.Identity)" />
@dasMulli
dasMulli / Directory.Build.targets
Last active Sep 29, 2018
Add Git commit count to version
View Directory.Build.targets
<Project>
<PropertyGroup>
<GenerateNuspecDependsOn>AddGitCommitCountToVersion;$(GenerateNuspecDependsOn)</GenerateNuspecDependsOn>
<!-- this is only used in NuGet 4.6.0 -->
<GetPackageVersionDependsOn>AddGitCommitCountToVersion;$(GetPackageVersionDependsOn)</GetPackageVersionDependsOn>
</PropertyGroup>
<Target Name="AddGitCommitCountToVersion"
BeforeTargets="PrepareForBuild;_GenerateRestoreProjectSpec"
Condition=" '$(DisableGitVersionSuffix)' != 'true' ">
@dasMulli
dasMulli / build-with-docker.sh
Last active Aug 7, 2017
Sample asp.net core / .net core build setup
View build-with-docker.sh
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
SRC_DIR="$(cd -P "$(dirname "$SOURCE")"&&pwd)"
WORKDIR="/usr/src"
IMAGENAME="microsoft/aspnetcore-build"
COMMAND="./build.sh"
docker pull "$IMAGENAME"
docker run --rm -w "$WORKDIR" -v "$SRC_DIR":"$WORKDIR" -- "$IMAGENAME" $COMMAND
You can’t perform that action at this time.