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
# Maximum number of file descriptors | |
kern.maxfiles=65536 | |
# Maximum number of file descriptors per process | |
kern.maxfilesperproc=32768 | |
# Max number of incoming connections in queue | |
kern.ipc.somaxconn=512 | |
# Maximum number of processes |
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
Connection.prototype.query = function (sql) { | |
if (!this._queries) this._queries = []; | |
var promise = new process.Promise; | |
promise.sql = sql; | |
this._queries.push(promise); | |
this.maybeDispatchQuery(); | |
return promise; | |
}; |
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
[translation:ERROR] Error: | |
[translation:ERROR] Traceback (most recent call last): | |
[translation:ERROR] File "translate.py", line 277, in main | |
[translation:ERROR] drv.proceed(goals) | |
[translation:ERROR] File "/Users/devin/Projects/pypy/pypy/translator/driver.py", line 744, in proceed | |
[translation:ERROR] return self._execute(goals, task_skip = self._maybe_skip()) | |
[translation:ERROR] File "/Users/devin/Projects/pypy/pypy/translator/tool/taskengine.py", line 116, in _execute | |
[translation:ERROR] res = self._do(goal, taskcallable, *args, **kwds) | |
[translation:ERROR] File "/Users/devin/Projects/pypy/pypy/translator/driver.py", line 279, in _do | |
[translation:ERROR] res = func() |
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
var LRUCache = {}; | |
LRUCache.Cache = function(maxsize) { | |
this._keys = []; | |
this._items = {}; | |
this._expires = {}; | |
this._size = 0; | |
this._maxsize = maxsize || 1024; | |
if (this._maxsize < 2) throw Error("max size must be > 2"); | |
}; |
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
var LRUCache = {}; | |
LRUCache.Cache = function(maxsize) { | |
this._keys = []; | |
this._items = {}; | |
this._expires = {}; | |
this._size = 0; | |
this._maxsize = maxsize || 1024; | |
if (this._maxsize < 2) throw new Error("max size must be > 2"); | |
}; |
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
var LRUCache = function (maxsize) { | |
this._keys = []; | |
this._items = {}; | |
this._expires = {}; | |
this._size = 0; | |
this._maxsize = maxsize || 1024; | |
if (this._maxsize < 2) { | |
throw new Error("max size must be > 2"); | |
} | |
}; |
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
(function ($) { | |
var rules = document.styleSheets[document.styleSheets.length-1].cssRules; | |
for (var idx = 0, len = rules.length; idx < len; idx++) { | |
$(rules[idx].selectorText).each(function (i, elem) { | |
elem.style.cssText += rules[idx].style.cssText; | |
}); | |
} | |
$('style').remove(); | |
$('script').remove(); | |
})(jQuery); |
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
-module(slugs). | |
-export([slugify/1]). | |
-define(tolower(C), (C+32)). | |
-define(islower(C), (C >= $a andalso C =< $z)). | |
-define(isupper(C), (C >= $A andalso C =< $Z)). | |
-define(isdigit(C), (C >= $1 andalso C =< $9)). | |
-define(isspace(C), ( | |
C =:= $\s orelse C =:= $\n orelse C =:= $\t orelse C =:= $\r |
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
var NUMBER_GROUPS = /(-?\d*\.?\d+)/g; | |
var naturalSort = function (a, b) { | |
var aa = String(a).split(NUMBER_GROUPS), | |
bb = String(b).split(NUMBER_GROUPS), | |
min = Math.min(aa.length, bb.length); | |
for (var i = 0; i < min; i++) { | |
var x = parseFloat(aa[i]) || aa[i].toLowerCase(), | |
y = parseFloat(bb[i]) || bb[i].toLowerCase(); |
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
<?php | |
function getPath($target, $path, $default=null) { | |
if (!$target) return $default; | |
if (!$path) return $target; | |
$parts = explode('.', $path); | |
while (list($idx, $key) = each($parts)) { | |
if (isset($target->$key)) { | |
$target = $target->$key; |
OlderNewer