Skip to content

Instantly share code, notes, and snippets.

Avatar

Denis Gorbachev DenisGorbachev

View GitHub Profile
View .mongorc.js
RegExp.escape = function(s) {
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
};
DBCollection.prototype.findOld = DBCollection.prototype.find;
DBCollection.prototype.find = function(query, fields) {
if (typeof query === 'string') {
var re = new RegExp(RegExp.escape(query), "i");
query = {$or: [{_id: re}, {name: re}, {title: re}, {text: re}, {"emails.address": re}]};
}
View debugger.xml
<application>
<component name="XDebuggerSettings">
<data-views />
<general />
<debuggers>
<debugger id="elixir">
<configuration>
<module-filters>
<list>
<module-filter pattern="Access" />
View gist:6670951
starfall@nx:~$ ping beingremarkable.me
PING beingremarkable.me (65.39.205.61) 56(84) bytes of data.
^C
--- beingremarkable.me ping statistics ---
32 packets transmitted, 0 received, 100% packet loss, time 31231ms
View GroupedDocumentChoiceList
<?php
namespace FasterThanWind\Bundle\TaskBundle\Form\ChoiceList;
use Symfony\Bundle\DoctrineMongoDBBundle\Form\ChoiceList\DocumentChoiceList as DocumentChoiceList;
use Symfony\Component\Form\Util\PropertyPath;
use Doctrine\ODM\MongoDB\DocumentManager;
/**
* Allows to choose from a list of documents, optionally grouped by a certain property (triggers the use of <optgroup> in template)
@DenisGorbachev
DenisGorbachev / PM2
Created Aug 2, 2015
PM2 test output
View PM2
starfall@nx:~/workspace/PM2$ bash test/bash/watch.sh
$pm2 kill
[PM2] Stopping PM2...
[PM2] deleteProcessId process id 0
[PM2][WARN] No process found
[PM2] All processes have been stopped and deleted
[PM2] PM2 stopped
# Determine wget / curl
View wallaby.js
var _ = require("underscore");
_.mixin(require("underscore.deep"));
var config = function(local, wallaby) {
process.env.NODE_PATH += ":" + require('path').join(wallaby.localProjectDir, 'core', 'node_modules');
return _.deepExtend({
testFramework: "mocha",
files: [
"!test/**/*Spec.coffee",
"**/helper/**/*.coffee",
View gist:ca8cc97b1abd093a67e4
{
"swf": {
"accessKeyId": "-",
"secretAccessKey": "-",
"region": "us-east-1"
},
"logger": {
"sanitizedProperties": ["credentials", "accessToken", "refreshToken"],
"transports": {
"Loggly": {
View gist:b0cc8764fb1bcd4e97d7
wallaby.js started
core v1.0.80
Thu, 16 Jul 2015 16:49:21 GMT wallaby:project File cache: /home/starfall/.WebStorm10/system/wallaby/projects/f3e4c4010717eb1a
Thu, 16 Jul 2015 16:49:21 GMT wallaby:workers Parallelism for initial run: 4, for regular run: 2
Thu, 16 Jul 2015 16:49:21 GMT wallaby:workers Starting run worker instance #0
Thu, 16 Jul 2015 16:49:21 GMT wallaby:workers Starting run worker instance #1
Thu, 16 Jul 2015 16:49:21 GMT wallaby:workers Starting run worker instance #2
Thu, 16 Jul 2015 16:49:21 GMT wallaby:workers Starting run worker instance #3
Thu, 16 Jul 2015 16:49:21 GMT wallaby:workers Web server is listening at 35019
Thu, 16 Jul 2015 16:49:21 GMT wallaby:project No instrumented file lib/Binding.coffee, re-instrumenting original file
@DenisGorbachev
DenisGorbachev / The Addonwave Contributor Agreement Version 1.0
Last active Aug 29, 2015
The Addonwave Contributor Agreement Version 1.0
View The Addonwave Contributor Agreement Version 1.0
The Addonwave Contributor Agreement Version 1.0
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Addonwave, as represented by Denis Gorbachev. Except for the license granted herein to Addonwave and recipients of software distributed by Addonwave, You reserve all right, title, and interest in and to Your Contributions.
Definitions.
"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Addonwave. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership
View autopackage.js
var fs = Npm.require("fs");
var path = Npm.require("path");
getDefaultProfiles = function() {
return [
{
path: "lib/compatibility",
architecture: ["client", "server"]
},{
path: "client/compatibility",