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; | |
using System.Reflection; | |
var dotnetVersion = System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription; | |
Console.WriteLine($"🌄 .NET Version: {dotnetVersion}"); | |
var productVersion = Assembly.GetEntryAssembly().GetCustomAttribute<System.Reflection.AssemblyInformationalVersionAttribute>().InformationalVersion; | |
Console.WriteLine($"🌄 Product Version : {productVersion}"); |
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; | |
var dotnetVersion = System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription; | |
Console.WriteLine($"🌄 .NET Version: {dotnetVersion}"); |
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; | |
Console.WriteLine("No static void main"); | |
var p = new Person(Guid.NewGuid(), "John", new DateOnly(1975, 1, 1)); | |
Console.WriteLine(p.ToString()); | |
public record Person(Guid Id, string Name, DateOnly DateOfBirth) | |
{ | |
public override string ToString() |
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
function slugify(input) { | |
if (!input) | |
return ''; | |
// make lower case and trim | |
var slug = input.toLowerCase().trim(); | |
// remove accents from charaters | |
slug = slug.normalize('NFD').replace(/[\u0300-\u036f]/g, '') |
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
{ | |
"RoslynExtensionsOptions": { | |
"EnableAnalyzersSupport": true, | |
"EnableDecompilationSupport": true, | |
"EnableImportCompletion": true | |
}, | |
"FormattingOptions": { | |
"EnableEditorConfigSupport": true, | |
"OrganizeImports": true | |
}, |
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
$$('img').forEach(async (img) => { | |
try { | |
const src = img.src; | |
// Fetch the image as a blob. | |
const fetchResponse = await fetch(src); | |
const blob = await fetchResponse.blob(); | |
const mimeType = blob.type; | |
// Figure out a name for it from the src and the mime-type. | |
const start = src.lastIndexOf('/') + 1; | |
const end = src.indexOf('.', start); |
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
public record Money | |
{ | |
private static readonly IReadOnlyCollection<string> SupportedCurrencies = new[] { "GBP", "EUR" }; | |
public decimal Amount { get; } | |
public string Currency { get; } | |
private Money(decimal amount, string currency) | |
{ | |
Amount = amount; |
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
{ | |
"colorscheme": "bubblegum", | |
"fontFace": "IntelOne Mono" | |
} |
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
public static class JsonSerializerExtensions | |
{ | |
public static string SerializeWithCamelCase<T>(this T data) | |
{ | |
return JsonSerializer.Serialize(data, new JsonSerializerOptions | |
{ | |
PropertyNamingPolicy = JsonNamingPolicy.CamelCase | |
}); | |
} | |
public static T DeserializeFromCamelCase<T>(this string json) |
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
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ | |
// © jrgoodland | |
// https://www.tradingview.com/script/RN1Tc7we-Simple-Dominance-Momentum-Indicator/ | |
//@version=5 | |
indicator("Simple Dominance Momentum Indicator", format = format.percent) | |
dom_ema_len = input.int(21, "EMA Length", 1) | |
trend_ema_len = input.int(55, "Trend EMA Length", 1) | |
string dom_ticker = na |