Skip to content

Instantly share code, notes, and snippets.

View ManInTheBox's full-sized avatar

Zarko Stankovic ManInTheBox

View GitHub Profile
@ManInTheBox
ManInTheBox / colors.txt
Created August 13, 2013 19:30
my git .git/config color setup
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
@ManInTheBox
ManInTheBox / Package Control.sublime-settings.json
Last active December 17, 2015 17:09
my sublime text editor installed packages
{
"auto_upgrade_last_run": null,
"installed_packages":
[
"BracketHighlighter",
"Clipboard History",
"ColorPicker",
"FileDiffs",
"Find Function Definition",
"Gist",
@ManInTheBox
ManInTheBox / onerror.js
Created September 28, 2012 15:47
onerror handler
(function() {
var oldErrorHandler = window.onerror;
window.onerror = function(errorMsg, file, line) {
var e = encodeURIComponent;
if (oldErrorHandler) {
oldErrorHandler(errorMsg, file, line);
}
(new Image()).src = '/njl/log?msg=' + e(errorMsg) + '&level=error' + '&context[file]=' + e(file) + '&context[line]=' + e(line) + '&context[browser]=' + e(navigator.userAgent) + '&context[page]=' + e(document.location.href);
};
})();
zarko@zare:~/Development/node/dev/mongoose$ MONGOOSE_SHARD_TEST_URI=mongodb://localhost:27017/mongoose_test MONGOOSE_SET_TEST_URI=mongodb://localhost:27017/mongoose_test make test
․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
․․․
✖ 6 of 702 tests failed:
1) model field selection casts elemMatch args (gh-1091):
MongoError: Error: Unsupported projection option: $elemMatch
zarko@zare:~/Development/node/dev/mongoose$ make test
You're not testing shards!
Please set the MONGOOSE_SHARD_TEST_URI env variable.
e.g: `mongodb://localhost:27017/database
Sharding must already be enabled on your database
․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
You're not testing replica sets!
@ManInTheBox
ManInTheBox / Curl.php
Created September 13, 2012 23:32
Curl wrapper
<?php
/**
* Curl is class you will probably want to use
* in order to fetch remote content.
*
* It is faster than `file_get_contents()` so using it is preferred.
*
* @author Zarko Stankovic <stankovic.zarko@gmail.com>
*/
@ManInTheBox
ManInTheBox / Crawler.php
Created September 13, 2012 23:29
Base Crawler
<?php
/**
* Crawler is a base class for performing website `crawling` (parsing) process.
*
* @property DOMXPath $xPath
* @property string $currency
* @property string $availability
* @property string $delivery
* @property string $price