This file contains 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 ObjectIdGuidExtensions | |
{ | |
private const byte TimeBasedGuidVersion = 1; | |
private static readonly DateTimeOffset UuidEpoch = new(1582, 10, 15, 0, 0, 0, TimeSpan.Zero); | |
public static Guid ToGuid(this string objId) | |
{ | |
var oIdSpan = new ReadOnlySpan<byte>(Convert.FromHexString(objId)); | |
var timestamp = BinaryPrimitives.ReadUInt32BigEndian(oIdSpan[..4]); |
This file contains 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
const factorial = f => n => n === 0 ? 1 : n * f(n - 1); | |
const fibonacci = f => n => n < 2 ? n : f(n - 1) + f(n - 2); | |
const Y = f => (g => g(g))(g => (f)(x => g(g)(x))); | |
Y(factorial)(5); | |
Y(fibonacci)(5); |
This file contains 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
const crypto = require('crypto'); | |
const request = require('request'); | |
const hmacKey = ''; | |
const hmacSecret = ''; | |
const since = new Date('2017-12-07'); | |
const bankFilter = bn => | |
bn.includes('люб') || |