Skip to content

Instantly share code, notes, and snippets.

View DenisGorbachev's full-sized avatar

Denis Gorbachev DenisGorbachev

View GitHub Profile
@DenisGorbachev
DenisGorbachev / .mongorc.js
Last active August 22, 2019 12:55
~/.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}]};
}
<application>
<component name="XDebuggerSettings">
<data-views />
<general />
<debuggers>
<debugger id="elixir">
<configuration>
<module-filters>
<list>
<module-filter pattern="Access" />
@DenisGorbachev
DenisGorbachev / PM2
Created August 2, 2015 11:17
PM2 test output
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
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",
{
"swf": {
"accessKeyId": "-",
"secretAccessKey": "-",
"region": "us-east-1"
},
"logger": {
"sanitizedProperties": ["credentials", "accessToken", "refreshToken"],
"transports": {
"Loggly": {
@DenisGorbachev
DenisGorbachev / gist:b0cc8764fb1bcd4e97d7
Created July 16, 2015 16:50
Wallaby console output
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 August 29, 2015 14:25
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
@DenisGorbachev
DenisGorbachev / autopackage.js
Last active August 29, 2015 14:20
autopackage.js
var fs = Npm.require("fs");
var path = Npm.require("path");
getDefaultProfiles = function() {
return [
{
path: "lib/compatibility",
architecture: ["client", "server"]
},{
path: "client/compatibility",
.bootstrap-code-wrapper {
article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],i
@DenisGorbachev
DenisGorbachev / report
Created March 6, 2015 09:52
Trello API bug report
diff --git a/server/jobs/RemoveAttachmentTrelloJob.coffee b/server/jobs/RemoveAttachmentTrelloJob.coffee
index 5769ff2..1225e3d 100644
--- a/server/jobs/RemoveAttachmentTrelloJob.coffee
+++ b/server/jobs/RemoveAttachmentTrelloJob.coffee
@@ -5,6 +5,7 @@ class @RemoveAttachmentTrelloJob extends TrelloJob
count = 0
done = => @done.apply(@, arguments) if --count <= 0
Attachments.find(selector, {sort: {pos: 1}}).forEach (attachment) =>
+ return holy.shit if attachment.name is "Taco.png" # Can't touch this!
++count