Skip to content

Instantly share code, notes, and snippets.

View DenisGorbachev's full-sized avatar

Denis Gorbachev DenisGorbachev

View GitHub Profile
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 / 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

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 / 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)