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
const Typograf = require('typograf'); | |
const inputText = Array.from(process.argv).slice(2).join(' '); | |
const typograf = new Typograf({locale: ['ru', 'en-US'], htmlEntity: {type: 'name', onlyInvisible: true}}); | |
const processedText = typograf.execute(inputText); | |
pbcopy(processedText.replace(/ /g, '\\u00A0')); | |
function pbcopy(data) { | |
var proc = require('child_process').spawn('pbcopy'); | |
proc.stdin.write(data); |
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
const {performance } = require('perf_hooks'); | |
const N = 1000; | |
const M = 100000; | |
const alphabet = 'abcdefghijklmnopqrstuvwxyz'; | |
const getRandomNum = to => Math.floor(Math.random() * to); | |
const getRandIdx = () => getRandomNum(alphabet.length); | |
function makeStrings(len = 100) { | |
let arr = Array(len); | |
let arr2 = Array(len); |
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
// @flow | |
import {errors} from '../marketplace_errors.json'; | |
console.log(Array.isArray(errors) && errors.length); | |
const types = new Map<string, number>(); | |
const other = []; | |
const generateMap = (arr: $ReadOnlyArray<[string | RegExp, string] | [string | RegExp]>) => arr |
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
const {cloneDeep} = require('lodash'); | |
const sizeof = require('object-sizeof'); | |
function cloneWeird(obj) { | |
return JSON.parse(JSON.stringify(obj)); | |
} | |
function generateString() { | |
return Math.random().toString(36).slice(2); | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<script src="https://code.jquery.com/jquery-3.1.0.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.0.6/rx.all.js"></script> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.log{ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<script src="https://code.jquery.com/jquery-3.1.0.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.0.6/rx.all.js"></script> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.log{ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- <script src="https://unpkg.com/[email protected]/dist/react.min.js"></script> | |
<script src="https://unpkg.com/[email protected]/dist/react-dom.min.js"></script> --> | |
<script src="https://fb.me/react-with-addons-15.1.0.js"></script> | |
<script src="https://fb.me/react-dom-15.1.0.js"></script> | |
<script src="https://unpkg.com/redux@^3.5.2/dist/redux.min.js"></script> | |
<script src="https://unpkg.com/[email protected]/dist/react-redux.min.js"></script> | |
<script src="https://unpkg.com/@reactivex/rxjs/dist/global/Rx.js"></script> |