Skip to content

Instantly share code, notes, and snippets.

void Main()
{
foreach (var txSet in Enum.GetValues(typeof(TransactionSet)))
{
Console.WriteLine("\n\n\n");
"".PadRight(120, '=').Dump($"Performing test on {txSet}");
PerformTest((TransactionSet)txSet);
}
}
@MithrilMan
MithrilMan / numeri-utili.md
Last active July 2, 2020 13:16
Numeri utili da chiamare in caso di problemi (TORINO)
@MithrilMan
MithrilMan / gist:7706a284253b5fe0e0bc6325c1ffa7bc
Last active January 21, 2020 14:47
LINQPad generic extension to dump number informations
public static class ObjectExtensions
{
public static string ToHex(this object val, int size)
{
return Convert.ToInt64(val).ToString("X2").PadLeft(size * 2, '0'); ;
}
public static string ToBitString(this object val, int size)
{
return Convert.ToString((Convert.ToInt64(val)), 2).PadLeft(size * 8, '0');
@MithrilMan
MithrilMan / chip.component.ts
Last active December 8, 2019 12:52
Angular component that mimic mat-chip aspect without requiring mat-chiplist
import { Component, OnInit, Input, AfterViewInit, ViewChild, ViewContainerRef, TemplateRef } from '@angular/core';
@Component({
selector: 'chip',
template: `
<ng-template #fixTemplate>
<!--ugly fix for chips, add an hidden mat-chip-list to be able to add mat-chip without including them in the list-->
<mat-chip-list style="display:none" id="chip-fix" disabled></mat-chip-list>
</ng-template>
<ng-container #fixContainer></ng-container>