This file contains 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
/** | |
* Функция возвращает строку с числом и названием единиц измерения (например '1 час', '11 минут', '21 грамм', '5 толстых шлюх'). | |
* @param {Number} number Число | |
* @param {String} nominative Название единиц измерения в иминительном падеже и ед.числе (час, минута) | |
* @param {String} genitive Название единиц измерения в родительном падеже и ед.числе (часа, минуты) | |
* @param {String} genitive_pl Название единиц измерения в родительном падеже и ед.числе (часов, минут) | |
* @param {Bool} showZero Показывать ли результат, если number = 0 | |
* @return {String} '5 минут', '11 часов', '1 грамм' | |
*/ | |
var getDeclinedNumeralStringForRussian = function (number, nominative, genitive, genitive_pl, showZero) { |
This file contains 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
/* exported shortcodeParams */ | |
/** | |
* Combine user attributes with known attributes and fill in defaults when needed. | |
* | |
* The defaults should be considered to be all of the attributes which are | |
* supported by the caller and given as a list. The returned attributes will | |
* only contain the attributes in the defaults list. | |
* | |
* If the params list has unsupported attributes, then they will be ignored and |
This file contains 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
/* global shortcodeParams */ | |
/* exported MyModule */ | |
var MyModule = function (params) { | |
'use strict'; | |
var defaults = { | |
}; |
This file contains 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
➜ diskUtil list | |
/dev/disk0 | |
#: TYPE NAME SIZE IDENTIFIER | |
0: GUID_partition_scheme *500.1 GB disk0 | |
1: EFI 209.7 MB disk0s1 | |
2: Apple_HFS shuvalov 499.2 GB disk0s2 | |
/dev/disk1 | |
#: TYPE NAME SIZE IDENTIFIER | |
0: GUID_partition_scheme *120.0 GB disk1 | |
1: EFI 209.7 MB disk1s1 |
This file contains 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
// ------------------------------------------------------- | |
// Roots global settings variables | |
// ------------------------------------------------------- | |
// font options (add your own!) | |
helvetica-neue = "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif | |
helvetica = "Helvetica Neue", Helvetica, Arial, sans-serif | |
georgia = Georgia, Cambria, "Times New Roman", Times, serif | |
lucidia-grande = "Lucida Grande", Tahoma, Verdana, Arial, sans-serif | |
monospace = unquote("'Bitstream Vera Sans Mono', Consolas, Courier, monospace") |
This file contains 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
'use strict'; | |
var path = require('path'); | |
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet; | |
var folderMount = function folderMount(connect, point) { | |
return connect.static(path.resolve(point)); | |
}; | |
module.exports = function (grunt) { | |
// grunt || grunt browser — разработка в браузере |
This file contains 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
'use strict'; | |
var shrtAttrs = require('shortcode-params'); | |
var util = require('util'); | |
var SuperModule = function (params) { | |
this.attributes = shrtAttrs(this.defaults, params); |
This file contains 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
// | |
// Time offset stuff | |
// | |
if (vk.time && !browser.opera_mobile) setTimeout(function() { | |
var t = new Date(), time = [0, t.getMonth() + 1, t.getDate(), t.getHours(), t.getMinutes()]; | |
if (time[1] == 1 && vk.time[1] == 12) { | |
vk.time[1] = 0; | |
} else if (time[1] == 12 && vk.time[1] == 1) { | |
time[1] = 0; | |
} else if (time[1] > vk.time[1] + 1 || vk.time[1] > time[1] + 1) { |
This file contains 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
# create app | |
npm i -g express | |
express test | |
cd test | |
npm i | |
# test w/o NODE_ENV | |
node app.js > /dev/null & | |
pid=$! | |
ab -n 1000 -c 100 -k -q http://127.0.0.1:3000/ | grep "Requests per" | cut -d ' ' -f 7 |
OlderNewer