This file contains 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
Add-Type -AssemblyName System.Speech | |
$cycle = 1 | |
$speak = New-Object System.Speech.Synthesis.SpeechSynthesizer | |
while (1) | |
{ | |
if ($cycle % 24 -eq 0) | |
{ | |
[console]::beep(4800, 4800); |
This file contains 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
#!/bin/bash | |
mkdir $1 | |
cd $1 | |
dotnet new sln | |
dotnet new classlib -n "$1.Infrastructure.CrossCutting" -f netstandard2.1 | |
dotnet sln add -s "04.Infrastructure" "$1.Infrastructure.CrossCutting" | |
dotnet new classlib -n "$1.Domain" -f netstandard2.1 | |
dotnet sln add -s "03.Domain" "$1.Domain" |
This file contains 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 Microsoft.CodeAnalysis.CSharp; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Microsoft.CodeAnalysis.CSharp.Syntax; | |
using Microsoft.CodeAnalysis; | |
namespace UnitTestGenerator |
This file contains 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
Date.prototype.clone = function () { | |
return new Date(this.valueOf()); | |
} | |
Date.prototype.addDays = function (days) { | |
var d = this.clone(); | |
d.setDate(d.getDate() + days); | |
return d; | |
} |
This file contains 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
extern int BarCount = 100; | |
extern int MagicNumber = 123456789; | |
extern double InitialVolume = 0.01; | |
extern int SlipPage = 3; | |
extern int MaxOrders = 40; | |
extern double MinimumDistanceForNewOrder = 70; | |
extern bool AutoConfig = false; | |
double lowest, highest; | |
double buyVolume, sellVolume; |
This file contains 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
extern int MonthsToLimitZone = 8; | |
extern double volume = 0.01; | |
extern double spaceBetweenOrders = 0.001; | |
extern int MagicNumber = 1234567890; | |
extern double profitInCurrency = 0.01; | |
extern double stopLossOrderLimit = 5.0; | |
double lowestDay, highestDay; | |
double beginOfSellZone, endOfSellZone; | |
double beginOfBuyZone, endOfBuyZone; |
This file contains 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
public static class LinqExtensions | |
{ | |
public static IEnumerable<T> AsHierarchy<T>(this IEnumerable<T> collection, | |
Func<T, T> parentSelector, Expression<Func<T, IEnumerable<T>>> childrenSelector, T root = default(T)) | |
{ | |
var items = collection.Where(x => parentSelector(x).Equals(root)).Safe(); | |
foreach (var item in items) | |
{ | |
var childrenProperty = (childrenSelector.Body as MemberExpression).Member as PropertyInfo; |
This file contains 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
var engine = new ScriptEngine(); | |
new[] { | |
"System", | |
"System.Core" | |
}.ToList().ForEach(assembly => engine.AddReference(assembly)); | |
new[] { | |
"System", | |
"System.Linq" |
This file contains 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
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Test case</Title> | |
<Shortcut>testcase</Shortcut> | |
<Description>Test case method</Description> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> |
NewerOlder