Skip to content

Instantly share code, notes, and snippets.

Avatar

Denis Gorbachev DenisGorbachev

View GitHub Profile
View gist:329a68914426a13c9909
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 Nov 7, 2014
Links from Hangout session with Slava Kim
View gist:d145872f25196ec409e4

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

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)