Skip to content

Instantly share code, notes, and snippets.

@atzimler
atzimler / Dotnet.Dockerfile
Created April 18, 2022 20:50
.NET Blazor WebASM Example Docker Container
FROM debian:latest
RUN apt-get update
RUN apt-get install -y wget openssh-server mc
RUN wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN rm packages-microsoft-prod.deb
RUN apt-get update
@atzimler
atzimler / MissingPart.csproj
Last active April 18, 2022 20:41
Missing iOS RuntimeIdentifier from .csproj
<PropertyGroup Condition="$(TargetFramework.Contains('-ios'))">
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
</PropertyGroup>
@atzimler
atzimler / CheckReentrancyReference.cs
Created March 1, 2019 00:02
CheckReentrancy .NET Reference Code Reference
if ((CollectionChanged != null) && (CollectionChanged.GetInvocationList().Length > 1))
throw new InvalidOperationException(SR.GetString(SR.ObservableCollectionReentrancyNotAllowed));
@atzimler
atzimler / ObservableCollectionExample2.cs
Created March 1, 2019 00:00
ObservableCollection Example 2
public void ItemsToBeAddedAreRejectedCorrectlyWhileSomeoneElseIsListening()
{
var observableCollection = new ObservableCollection<int>();
observableCollection.CollectionChanged += (o, e) =>
{
if (e.Action == NotifyCollectionChangedAction.Add)
{
observableCollection.Clear();
}
};
@atzimler
atzimler / ObservableCollectionExample1.cs
Created February 28, 2019 23:59
ObservableCollection Example 1
public void ItemsToBeAddedAreRejectedCorrectly()
{
var observableCollection = new ObservableCollection<int>();
observableCollection.CollectionChanged += (o, e) =>
{
if (e.Action == NotifyCollectionChangedAction.Add)
{
observableCollection.Clear();
}
};
make install prefix=/opt/local
export PATH=/Library/Frameworks/Mono.framework/Versions/Current/bin:$PATH
tar -xvvzf ../precompiled_resx.tar.gz
patch -p1 <../precompiled_resx.patch
resgen src/NAnt.Core/Resources/Strings.resx bootstrap/NAnt.Core.Resources.Strings.resources
Error: Invalid ResX input. Could not find valid "resheader" tags for the ResX reader & writer type names.
make: *** [bootstrap/NAnt.Core.dll] Error 1
tar -xvvzf nant-0.92-src.tar.gz
cd nant-0.92
patch -p1 <../xamarin.patch