Skip to content

Instantly share code, notes, and snippets.

🐼
Something else

Denis Malinochkin mrmlnc

🐼
Something else
Block or report user

Report or block mrmlnc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View fast_glob_benchmark_nettop.txt
> fast-glob@3.0.2 bench-async /home/mrmlnc/fast-glob
> npm run bench-async-flatten && npm run bench-async-deep
> fast-glob@3.0.2 bench-async-flatten /home/mrmlnc/fast-glob
> node ./out/benchmark --type async --pattern "*"
===> Benchmark pattern (*) with 100 launches (async)
fast-glob-current.js
View glob.ts
import * as path from 'path';
import * as fs from 'fs';
import * as micromatch from 'micromatch';
import * as io from '../utils/io';
import { ITask, IOptions, IEntry } from '../types';
export type TMatch = string | IEntry;
View bem.d.ts
declare namespace BemSDK {
export namespace EntityName {
/**
* Object to representation of entity name.
*/
interface EntityRepresentation {
/**
* The block name of entity.
*/
block: string;
View singleLinkedList.ts
var data = {
value: 123,
next: {
value: 321,
next: {
value: 348,
next: {
value: 981,
next: {
value: 712,
View parallelFetch.ts
function mockupFetch(cache: object, url: stirng) {
return new Promise((resolve) => {
if (cache.hasOwnProperty(url)) {
return resolve(cache[url]);
}
setTimeout(() => {
const date = new Date();
const min = date.getMinutes();
const sec = date.getSeconds();
View normalize.ts
const str = ' some string ';
function normalize(input: string): string {
let length = input.length;
let i = 0;
while (i < length - 1) {
const char: string = input[i];
const nextChar: string = input[i + 1];
View group-anagram.ts
const words = ["eat", "tea", "tan", "ate", "nat", "bat"];
function updateDictionary(dict: object, word: string): void {
const key = word.split('').sort().join('');
if (!dict.hasOwnProperty(key)) {
dict[key] = [];
}
dict[key].push(word);
View median.ts
function median3(a: number, b: number, c: number): number {
if ((a - b) * (c - a) >= 0) {
return a;
} else if ((b - a) * (c - b) >= 0) {
return b;
}
return c;
}
console.log(2 === median3(1, 2, 3));
View anagram.ts
function hasLetter(dict: object, letter: char): boolean {
return dict.hasOwnProperty(letter);
}
function updateLetterStat(dict: object, letter: char): void {
if (!hasLetter(dict, letter)) {
dict[letter] = 0;
}
dict[letter] += 1;
@mrmlnc
mrmlnc / vscode.release.february.md
Created Mar 8, 2017
[vk.com/vs_code] Список изменений февральского релиза (1.10.1) редактора Visual Studio Code.
View vscode.release.february.md

Что нового в февральском релизе VS Code 1.10.1?

Мини-карта кода

Самая запрашиваемая функциональность наконец-то в VS Code. Поддерживается два режима рендеринга:

  • Символьный (рендерит символы как есть)
You can’t perform that action at this time.