Skip to content

Instantly share code, notes, and snippets.

View domartynov's full-sized avatar

Dmitry Martynov domartynov

  • @stash-invest
  • New York, NY
View GitHub Profile
package convey
type actionSpecifier uint8
const (
noSpecifier actionSpecifier = iota
skipConvey
focusConvey
)
@domartynov
domartynov / merge_remotes_to_subdirs.py
Created January 23, 2021 02:46
Merge GIT repos in subdirs while keeping history (using pygit2)
"""
Applied to a repo:
git init
git remote add R1 url1
git fetch R1 master
. . .
git remote add RN urlN
git fetch RN master
Replays commits from remotes in chronological order,
@domartynov
domartynov / figlet-report.md
Last active January 7, 2021 02:39
Render report generated using zio/zio-cli figlet code for fonts from http://www.figlet.org/fontdb.cgi
           **                   **           ****         **      **    ** **      **                                                                **                                                      
          /**                  /**          /**/   ***** /**     //    // /**     /**                               ******   ****                   /**                                        **   **       
  ******  /**       *****      /**  *****  ****** **///**/**      **    **/**  ** /** **********  *******   ****** /**///** **//**  ******  ****** ****** **   ** **    ** ***     ** **   ** //** **  ******
 //////** /******  **///**  ****** **///**///**/ /**  /**/****** /**   /**/** **  /**//**//**//**//**///** **////**/**  /**/** /** //**//* **//// ///**/ /**  /**/**   /**//**  * /**//** **   //***  ////** 
  ******* /**///**/**  //  **///**/*******  /**  //******/**///**/**   /**/****   /** /** /** /** /**  /**/** 
@domartynov
domartynov / TestDir.cs
Last active June 25, 2018 16:49
Reusable test dir per test logic added via [TestDir.Use] for xunit
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Threading;
using FluentAssertions;
using Xunit;
using Xunit.Sdk;
namespace ExcelReporting.Tests.Common
using ...
static void Main(string[] args)
{
var x = (Microsoft.Office.Interop.Excel._Application) Marshal.GetActiveObject("Excel.Application");
x.ChartDataPointTrack = false;
MapperRegistry.Mappers.Add(new ComObjectMapper());
var config = new MapperConfiguration(c => c.CreateMap<Microsoft.Office.Interop.Excel._Application, App>());
config.AssertConfigurationIsValid();
var mapper = config.CreateMapper();
@domartynov
domartynov / task
Created October 30, 2013 23:12
Rain Water Volume Task
using System;
using Xunit;
namespace RainTask
{
public class Task
{
[Fact]
public void TestNoLand()
{