Skip to content

Instantly share code, notes, and snippets.

#Requires -Version 6.1.3
#Requires -RunAsAdministrator
param(
[Parameter(mandatory=$true)]
$Name,
[Parameter(mandatory=$true)]
$DisplayName,
[Parameter(mandatory=$true)]
$Description,
@Markeli
Markeli / string.cs
Last active October 12, 2023 08:12
В какой момент возникнет ошибка?
string s = "Hello";
s[2] = 'A';
Console.WriteLine(s[2]);
@Markeli
Markeli / action.cs
Last active November 19, 2020 10:44
Что будет выведено на консоль?
public void Test()
{
var actions = new List<Action>();
for (int index = 0; index < 100; index++)
{
Action func = () => {{
Console.WriteLine($"{index}");
}};
actions.Add(func);
}
@Markeli
Markeli / .gitlab-ci.yml
Created August 14, 2019 16:16
Files for GitLab CI with Cake
stages:
- build
- tests
- publish
- deploy
# build
build auto:
using System;
using System.Reflection;
using Microsoft.Extensions.Logging;
namespace SIISLtd.UCATI.AOP
{
public class LoggingDecorator<T> : DispatchProxy
{
private T _decorated;
@Markeli
Markeli / gist:c2d27dcc6757de1b05e21c22eece0f6c
Created November 8, 2016 20:34
StackOverflow:RU:588475
public void DoWork()
{
//Your code goes here
Task.Factory.StartNew(() =>
{
var coat = human.Coar("2");
if (!coat.SetOwner(human)) return;