Skip to content

Instantly share code, notes, and snippets.

View eshikerya's full-sized avatar

Jacky Shikerya eshikerya

View GitHub Profile
//@ts-check
const Benchmark = require('benchmark');
// data
const data = Array(10).fill(true).map(_ => Array(1000).fill(true).map(_ => ~~(Math.random() * 100)));
const mergeAnton = function(nums1, m, nums2, n) {
return [...nums1.splice(0, m), ...nums2].sort((a, b) => a - b).map((item, index) => nums1[index] = item);
};

Keybase proof

I hereby claim:

  • I am eshikerya on github.
  • I am shikerya (https://keybase.io/shikerya) on keybase.
  • I have a public key ASBagiNgurhqQ_UXiIJyXPjZb1cRO8Pun30JjR2y3w2ONQo

To claim this, I am signing this object:

@eshikerya
eshikerya / flatten.js
Created July 19, 2017 16:23 — forked from timo22345/flatten.js
Flatten.js, general SVG flattener. Flattens transformations of SVG shapes and paths. All shapes and path commands are supported.
<!doctype html>
<html>
<title>Flatten.js, General SVG Flattener</title>
<head>
<script>
/*
Random path and shape generator, flattener test base: http://jsfiddle.net/xqq5w/embedded/result/
Basic usage example: http://jsfiddle.net/Nv78L/3/embedded/result/
@eshikerya
eshikerya / response-typography.scss
Created July 19, 2017 16:21
Response Typography
// https://www.ascedia.com/blog/june-2017/responsive-typography
//------------------------------------//
// THEME SETTING VARIABLES //
//------------------------------------//
// Set min/max viewport widths for calculation
$font-min-width: 480; // min width needed for calculation
$font-max-width: 1200; // max width to for calculation
// Set min/max font sizes for each element
var data = [
{id: 1, name: 'John', age: 30, sex: 'male', department: 'development'},
{id: 2, name: 'Conor', age: 29, sex: 'male', department: 'development,managment'},
{id: 3, name: 'Jane', age: 30, sex: 'female', department: 'managment'},
{id: 4, name: 'Anna', age: 25, sex: 'female', department: 'support'},
{id: 5, name: 'Jack', age: 35, sex, 'male'}
];
var a = new armap('id', ['department', 'sex'], ['other'], [function (department) {
return /,/.test(department) ? department.split(',') : department