IoC wraps Autofac for using dynamic services
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.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Threading; | |
namespace ConcurrentLocking | |
{ | |
public class ConcurrentLockDictionary<TKey> | |
{ | |
public class KeyLock |
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.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
namespace Pmunin.Gists | |
{ | |
public static class EquatableExtensions | |
{ |
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
import React from 'react' | |
export class Subscribe extends React.Component | |
{ | |
state={ | |
//subscriptions:[], | |
childrenParams:[] | |
} | |
render(){ | |
var subscribeToItems = this.props.to instanceof Array?this.props.to : [this.props.to] |
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
//gist url: https://gist.github.com/pmunin/ae8d24d68f239528adf73177265fa838 | |
var context = require.context('./', true, /(\.\/)[^/]+(\/)$/); | |
//regex to get all 1st level subfolders paths (e.g.: "./subFolder/", but not "./subFolder/subFolder/") | |
const subModules = {} | |
context.keys().forEach((filename)=>{ //e.g.: ./subFolder/ | |
const subModule = context(filename); //same as: import * as subModule from './subFolder/' | |
subModules[filename]=subModule; | |
}); |
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
// Latest version here: https://gist.github.com/pmunin/8411f9772f13b7c4d3b8c39d03832760 | |
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"taskName": "webpack", | |
"command": "webpack", | |
"type": "shell", | |
"args": [ | |
"--display-modules" |
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.Collections.Generic; | |
using System.Linq; | |
namespace CompareSetsExtensions | |
{ | |
public static class CompareSetsExtensions | |
{ | |
public static IEnumerable<TResult> FullOuterJoin<TLeft, TRight, TKey, TResult>( | |
IEnumerable<TLeft> left, |
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 DictionaryUtils; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using TestGraphUtils; | |
using Xunit; | |
namespace GraphAggregateUtils |
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.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace WeakDelegates | |
{ |
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.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Timers; | |
namespace DebounceUtils | |
{ | |
/// <summary> | |
/// Event debouncer helps to prevent calling the same event handler too often (like mark Dirty or Invalidate) |