Skip to content

Instantly share code, notes, and snippets.

View anatoliyarkhipov's full-sized avatar

Anatoliy Arkhipov anatoliyarkhipov

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<JSCodeStyleSettings>
<option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
<option name="USE_DOUBLE_QUOTES" value="false" />
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
{
"extends" : "airbnb",
"env" : {
"browser" : true
},
"globals" : {
"__DEV__" : false,
"__PROD__" : false,
"__DEBUG__" : false,
"__DEBUG_NW__" : false
function FindProxyForURL(url, host) {
// If the hostname matches, send direct.
if (dnsDomainIs(host, ".intranet.domain.com") ||
shExpMatch(host, "(*.abcdomain.com|abcdomain.com)"))
return "DIRECT";
// If the protocol or URL matches, send direct.
if (url.substring(0, 4)=="ftp:" ||
shExpMatch(url, "http://abcdomain.com/folder/*"))
function sum(args){
return Array.prototype.reduce.call(args, function(a, b){ return a + b }, 0)
}
function add(){
var total = sum(arguments),
self = function(){ total += sum(arguments); return self }
return (self.valueOf = function(){ return total }, self)
}