Skip to content

Instantly share code, notes, and snippets.

View ManInTheBox's full-sized avatar

Zarko Stankovic ManInTheBox

View GitHub Profile
@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
@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>
*/
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!
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
@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);
};
})();
@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 / 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 / curlinfo.txt
Created October 31, 2013 15:48
curl info
-w, --write-out <format>
Defines what to display on stdout after a completed and success-
ful operation. The format is a string that may contain plain
text mixed with any number of variables. The string can be spec-
ified as "string", to get read from a particular file you spec-
ify it "@filename" and to tell curl to read the format from
stdin you write "@-".
The variables present in the output format will be substituted
by the value or text that curl thinks fit, as described below.
@ManInTheBox
ManInTheBox / syliusbundles.txt
Created November 4, 2013 00:23
Sylius bundles documentation and status
[docs] SyliusShippingBundle
SyliusWebBundle
[docs] SyliusVariableProductBundle
[docs] SyliusTaxonomiesBundle
[docs] SyliusTaxationBundle
[docs] SyliusSettingsBundle
[docs] SyliusOrderBundle
[docs] SyliusResourceBundle
SyliusPromotionsBundle
[docs] SyliusProductBundle
➜ chess.com-master git:(ZS/fix-v3-v2-messages) whois belgradejs.org
Domain Name:BELGRADEJS.ORG
Domain ID: D169353928-LROR
Creation Date: 2013-08-03T09:21:01Z
Updated Date: 2013-10-03T03:45:50Z
Registry Expiry Date: 2014-08-03T09:21:01Z
Sponsoring Registrar:Domainclub.com, LLC (R1761-LROR)
Sponsoring Registrar IANA ID: 880
WHOIS Server:
Referral URL: