Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Something happening!

Timofey Kachalov sanex3339

💭
Something happening!
View GitHub Profile
View gist:c926206ae10dfd4c20a0225c1d989469
var a0i = [
'ugq8ESoA',
'tCkyWO9IW4q=',
'oHxdNmouWQe=',
'WO3cIffHvG==',
'nmoSFmkvWQ0=',
'EMCUwCo1',
'W693WRKWW5S=',
'WQddQJlcSKO=',
'W4hcNva=',
View gist:fe0f9a956ac3e42fbbe18a3f17adec3e
This file has been truncated, but you can view the full file.
var a0a = [
'originalInstance',
'bootstrapModuleFactory',
'$controller',
'wks',
'PairsObservable',
'RegExp',
'advance',
'serializeBody',
View gist:6e17f42bcdb786c074a93d05ff448fe1
import { inject, injectable, } from 'inversify';
import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
import * as eslintScope from 'eslint-scope';
import * as ESTree from 'estree';
import * as estraverse from 'estraverse';
import { IOptions } from '../../interfaces/options/IOptions';
import { IRandomGenerator } from '../../interfaces/utils/IRandomGenerator';
import { IVisitor } from '../../interfaces/node-transformers/IVisitor';
View Number range type with step
type PrependToArray <Element, TArray extends _Iterator<any, any[]> = []> =
((head: Element, ...args: TArray) => any) extends ((...args: infer TResult) => any)
? TResult
: TArray;
type ArrayLength <TArray extends _Iterator<any, any[]>> = TArray['length'];
type NextIteratorValue <TArray extends _Iterator<any, any[]>> = PrependToArray<any, TArray>;
type _Iterator<
View Number range type
type PrependToArray <Element, TArray extends _Iterator<any, any[]> = []> =
((head: Element, ...args: TArray) => any) extends ((...args: infer TResult) => any)
? TResult
: TArray;
type ArrayLength <TArray extends _Iterator<any, any[]>> = TArray['length'];
type NextIteratorValue <TArray extends _Iterator<any, any[]>> = PrependToArray<any, TArray>;
type _Iterator<Index extends number = 0, Current extends any[] = []> = {
View gist:85822811de5722c24197c0d7a7b5c6e2
type UnionKeys<T> = T extends any ? keyof T : never;
type StrictUnionHelper<T, TAllKeys extends PropertyKey> = T extends any
? T & Partial<Record<Exclude<TAllKeys, keyof T>, never>>
: never;
/**
* Тип для правильной работы Discriminated Union типов
* https://stackoverflow.com/questions/52677576/typescript-discriminated-union-allows-invalid-state/52678379#52678379
*/
export type StrictUnion<T> = StrictUnionHelper<T, UnionKeys<T>>;
View ConditionFilter
type Condition<T> = {shouldApply: boolean, conditionFunc: ((item: T) => boolean)};
/**
* Фильтрует данные на основе массива ф-ий условий
* В случае отсутствия фильтров или когда не применен ни один фильтр - возвращается оригинальный массив данных
*/
export class ConditionFilter <T> {
/**
* Константа, для того, чтобы всегда применять фильтр
*/
View gist:e6ec8bb1cdddb7c02e6975ca16914e68
var str = 'class ಠ_ಠ extends Array {constructor(j = "a", ...c) {const q = (({u: e}) => {return { [`s${c}`]: Symbol(j) };})({});super(j, q, ...c);}}' +
'new Promise((f) => {const a = function* (){return "\u{20BB7}".match(/./u)[0].length === 2 || true;};for (let vre of a()) {' +
'const [uw, as, he, re] = [new Set(), new WeakSet(), new Map(), new WeakMap()];break;}f(new Proxy({}, {get: (han, h) => h in han ? han[h] ' +
': "42".repeat(0o10)}));}).then(bi => new ಠ_ಠ(bi.rd));';
try {
eval(str);
} catch(e) {
alert('Your browser does not support ES6!')
}
View gist:cf5fe8289051cf9ef1a54d6e000b7364
This file has been truncated, but you can view the full file.
var _0x304d = [
'd2luZG93Q3JlYXRpb25JbnRlcnZhbA\x3d\x3d',
'dU5I',
'bkJt',
'bUts',
'b1lt',
'QUND',
'SEZV',
'Y2xvc2VXaW5kb3c\x3d',