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
| 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
| 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.ComponentModel.DataAnnotations; | |
| using System.ComponentModel.DataAnnotations.Schema; | |
| namespace Caching{ | |
| [Table(DbCacheService.TableName)] | |
| public class CachedValue | |
| { | |
| [Key] |
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
| cd C:\Program Files\Oracle\VirtualBox | |
| VBoxManage modifyvm "MacOS" --cpuid-set 00000001 000106e5 00100800 0098e3fd bfebfbff | |
| VBoxManage setextradata "MacOS" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3" | |
| VBoxManage setextradata "MacOS" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0" | |
| VBoxManage setextradata "MacOS" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple" | |
| VBoxManage setextradata "MacOS" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" | |
| VBoxManage setextradata "MacOS" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1 | |
| VBoxManage setextradata "MacOS" VBoxInternal2/EfiGopMode 4 | |
| pause |
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; | |
| using System.Runtime.CompilerServices; | |
| using System.Threading.Tasks; | |
| public static class FormattableStringExtensions | |
| { | |
| public static FormattableString AsFormattable(this string str) { | |
| return FormattableStringFactory.Create(str); |
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.Threading; | |
| using System.Threading.Tasks; | |
| namespace AsyncLockExtensions | |
| { | |
| /// <summary> | |
| /// Virtual critical section for async function. | |
| /// Monitor.Enter/Exit and lock{} does not work for async methods and cause deadlocks and exceptions. AsyncLock solves these issues. Implementation copied from Microsoft.EntityFrameworkCore.Internal.AsyncLock (.nuget\packages\microsoft.entityframeworkcore\2.1.4\lib\netstandard2.0\Microsoft.EntityFrameworkCore.dll) | |
| /// <seealso cref="https://github.com/neosmart/AsyncLock"/> |
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.Linq; | |
| public static class EnumerablePartitionExtensions{ | |
| /// <summary> | |
| /// Generate lazy partitions for enumerable | |
| /// </summary> | |
| /// <typeparam name="T"></typeparam> | |
| /// <param name="items">source items to create partitions from</param> |
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; | |
| using System.Reflection; | |
| using System.Runtime.CompilerServices; | |
| namespace FormattableStrings | |
| { | |
| public static class FormattableStringExtensions | |
| { |
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.Runtime.CompilerServices; | |
| namespace WeakMap | |
| { | |
| /// <summary> | |
| /// Allows to link additional properties to any objects by weakly linking a dictionary for any object. | |
| /// Weakly means the dictionary exists in memory only as long as object it linked to is still stored in memory |