Skip to content

Instantly share code, notes, and snippets.

View shuhrat's full-sized avatar
🏠
Working from home

Шухрат Шадмонов shuhrat

🏠
Working from home
View GitHub Profile
var s = make(1)(2)(3)(4)(5);
var add = function (a, b) { return a + b; };
var mul = function (a, b) { return a * b; };
s(add); //15
s(mul); // 120
//Write make =)
@shuhrat
shuhrat / dublicator.js
Created November 30, 2012 07:57
Dublicator
[1, 2, 3].tail() => [1, 2, 3, 1, 2, 3]
[1, 2, 3].dublicate() => [1, 1, 2, 2, 3, 3]
@shuhrat
shuhrat / challange.js
Last active December 28, 2015 22:14
Array challange
Array.prototype.tail = function() {
return Array.prototype.concat.apply(this, this);
}
Array.prototype.dublicate = function() {
var dublicated = [],
length = this.length;
for (var i=0; i<length; i++) {
dublicated.push(this[i], this[i]);
@shuhrat
shuhrat / gist:4239756
Created December 8, 2012 10:44
I had wondered how google does it, now I know that it is not as hard as I thought

Challenge source

function Dictionary(vocabulary) {
  var counter = 0,
      length = vocabulary.length,
      cache = {},
      position = function(counter) {
        var word, remainder;
        if (counter in cache) return cache[counter];
@shuhrat
shuhrat / .gitignore
Created July 30, 2013 06:55
Gitignore file for our projects on Bitrix CMF
# files
.gitignore
.idea
cgi-bin
#OS FILES
.DS_Store
Thumbs.db
#DEV
@shuhrat
shuhrat / .gitignore
Created July 30, 2013 06:55
Gitignore file for our projects on Bitrix CMF
# files
.gitignore
.idea
cgi-bin
#OS FILES
.DS_Store
Thumbs.db
#DEV
git remote add origin https://github.com/emfy/dev.rudenta.git
git push -u origin master
git remote add origin https://github.com/emfy/dev.interpremium.git
git push -u origin master
git fetch --all
git reset --hard origin/master
@shuhrat
shuhrat / dabblet.css
Created January 9, 2014 08:09
Untitled
body {
background: none repeat scroll 0 0 #FFFFFF;
color: #000000;
font: 0.8em Arial,Helvetica,sans-serif;
margin: 0;
padding: 0 0 1em;
position: relative;
z-index: 0;
}
@shuhrat
shuhrat / gemini.md
Last active August 29, 2015 14:16
Gemini

#TC

![Сборка скриншотов dev][dev_screenshots] ![Прверка PR][pr_screenshots]

#Как работает Tyrion

  • Собранный web4
  • Общая родительская папка
@shuhrat
shuhrat / gist:e801defc01d9fcf9af57
Last active August 29, 2015 14:25 — forked from dsibilly/gist:2992412
Node.js clustered HTTP server example
(function () {
'use strict';
var cluster = require('cluster'),
http = require('http'),
os = require('os'),
/*
* ClusterServer object