This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| annotations: | |
| kompose.cmd: ./kompose convert | |
| kompose.version: 1.9.0 (093c756) | |
| creationTimestamp: null | |
| labels: | |
| io.kompose.service: notebook | |
| name: notebook |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl https://gist.githubusercontent.com/spirit11/1200dabdf0eb657d8dbdb47361d9a293/raw/b4e6c16c501d0ac8d6b4327eee8c18c63514d8c9/registry.yaml > registry.yaml | |
| docker stack deploy --compose-file registry.yaml registry | |
| git clone --depth 1 https://github.com/jpetazzo/container.training.git | |
| cd container.training/stacks | |
| docker-compose -f dockercoins.yml build | |
| docker-compose -f dockercoins.yml push | |
| docker stack deploy --compose-file dockercoins.yml dockercoins |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void Main() | |
| { | |
| IContainer c = new Container(x => | |
| { | |
| x.For<IUsedByA>().Use<UsedByA>(); | |
| x.For<IUsedByAOther>().Use<UsedByAOther>(); | |
| x.For<IA>().Use<A0>(); | |
| }); | |
| c.GetInstance<UseIA>(); | |
| c.GetInstance<UseA0WithOverride>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| /// <summary> | |
| /// Extension class for pattern matching workaround in older version of C# | |
| /// </summary> | |
| public static class PatternMatchExtension | |
| { | |
| public interface IMatcher<T> | |
| where T : class | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AsyncCommand : ICommand, INotifyPropertyChanged | |
| { | |
| public AsyncCommand(Func<Task> Action) | |
| { | |
| action = Action; | |
| canExecute = true; | |
| } | |
| public event EventHandler CanExecuteChanged; |