Skip to content

Instantly share code, notes, and snippets.

View DenisGorbachev's full-sized avatar

Denis Gorbachev DenisGorbachev

View GitHub Profile
@DenisGorbachev
DenisGorbachev / GroupedDocumentChoiceList
Created June 9, 2012 10:57
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)
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
@DenisGorbachev
DenisGorbachev / gist:d145872f25196ec409e4
Created November 7, 2014 07:19
Links from Hangout session with Slava Kim

http://wompfeed.com/ - https://github.com/thedeerchild/wompfeed - social app, combine gif search with your own list in Buzzfeed style Ralph - mobile, cordova, chat, location-based: https://groups.google.com/forum/#!topic/meteor-talk/Fc9vH6Lk6lk https://github.com/marbemac/ralph https://github.com/marbemac/ralph-mobile https://github.com/Exartu/Exartu-CRM - CRM and Recruiting enterprisy tool http://whatwhenapp.com/ - webapp, build your own timeline/schedule as a freelancer Telescope - https://github.com/TelescopeJS/Telescope - nuff said https://github.com/yoamomonstruos/tombates.co - personal site https://github.com/peerlibrary/peerlibrary - mitar's pdf library with anotations https://github.com/zhouzhuojie/hast - a tool for building presentations in markdown

var newZombieCountsByNode = []
for(var nodeIdx = 0; nodeIdx < zombieCountsByNode.length; nodeIdx++) {
var incomingZombies = neighborsByNode[nodeIdx].map(function(neighbor) { return zombieCountsByNode[neighbor] / neighborsByNode[neighbor].length })
newZombieCountsByNode[nodeIdx] = incomingZombies.reduce(function(a,b) {return a + b})
}
var isStabilised = true
for(var nodeIdx = 0; nodeIdx < zombieCountsByNode.length; nodeIdx++) {
if (Math.abs(zombieCountsByNode[nodeIdx] - newZombieCountsByNode[nodeIdx]) > 0.10) {
@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
.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 / 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",
@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 / 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
{
"swf": {
"accessKeyId": "-",
"secretAccessKey": "-",
"region": "us-east-1"
},
"logger": {
"sanitizedProperties": ["credentials", "accessToken", "refreshToken"],
"transports": {
"Loggly": {