Skip to content

Instantly share code, notes, and snippets.

Timur Kheyfets tkheyfets

Block or report user

Report or block tkheyfets

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 to_array.js
function toArray(args) {
View uniq_id.js
var uniqID = (function () {
var _uniq = new Date().getTime();
return function () {
return (_uniq++).toString(36);
View memoize.js
function memoize(fn) {
var slice = Array.prototype.slice,
cache = [];
return function () {
var args =,
result = cache[args];
if (!result) {
result = cache[args] = fn.apply(this, args);
View xhr_promise.js
function get(url) {
return new Promise(function(resolve, reject) {
var xhr = new XMLHttpRequest();'GET', url);
xhr.onload = function() {
if (xhr.status === 200) {
} else {
View text-overflow.css
.text-overflowed {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
View oop.js
function extend(Child, Parent) {
Child.prototype = Object.create(Parent.prototype);
Child.prototype.constructor = Child;
return Child;
var Message = function (text) {
this.text = text;
tkheyfets / googlemaps-like-pin.html
Last active Mar 23, 2016
GoogleMaps like Pin with only css and html
View googlemaps-like-pin.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width" />
<title>Google Maps like Pin</title>
<link type="text/css" rel="stylesheet" href="pin.css" />
tkheyfets / chart.html
Last active Mar 23, 2016
Interactive chart with html and css
View chart.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" type="text/css" href="main.css" />
<title>CSS Chart</title>
<div class="bars-wrapper">
tkheyfets / defer.js
Last active Mar 23, 2016
Force code to run in next drawing frame
View defer.js
function defer(fn) { return setTimeout(fn, 0); }
View es6_insert.js
const insert = (item, index, array) =>
[...array.slice(0, index),
...array.slice(index, array.length)];
You can’t perform that action at this time.