Skip to content

Instantly share code, notes, and snippets.

View avesus's full-sized avatar
🎯
Focusing

Brian Cannard avesus

🎯
Focusing
View GitHub Profile
@avesus
avesus / flux.txt
Created August 26, 2015 12:06
What Flux really is
The Dispatcher is singleton visible for all Views with its dispatch() method.
(Note: it visible for Stores with its register() method).
View uses The Dispatcher to call its dispatch() method specifying eventName and eventItemData
Store:
Domain A
Store A : EventEmitter
Collection Model A1
Tree Model A2
@avesus
avesus / git-subtles.md
Last active August 27, 2015 19:25
Git Subtles

Adding remotes

git remote add local_remote_name https://github.com/user/repo.git
git remote -v

Refresh data:

git fetch base_remote_name
@avesus
avesus / node-gc-memuse.js
Created August 28, 2015 15:21
Node gc memoryUsage test
console.log(process.memoryUsage());
global.gc();
var a = {
m: new Uint8Array(100000000)
};
var b = {
m: new Uint8Array(100000000)
};
@avesus
avesus / Location.js
Last active September 10, 2015 13:35 — forked from barneycarroll/Location.es6.min.js
An ultra-small URI parsing function that accepts a URI-like string & returns an object with all the string properties of the native Location object for that string. Works using native property detection, without received wisdom (ie dictionaries, inference, etc).
var Location = (function LocationClosure(){
var properties = {};
// Create and return a link with the given URI
function makeLink( URI ){
var link = document.createElement( 'a' );
link.href = URI;
return link;
@avesus
avesus / problem-001.md
Created September 21, 2015 21:12
Задание на собеседовании

Загрузка файла на сервер. Требования.

Представь, что тебе надо срочно передать скриншот экрана твоего смартфона. Веб-интерфейс поддерживает поле выбора файла, при нажатии на кнопку открывается как раз обзор твоих последних фото, и там же есть только что сделанный тобой скриншот. Представь, что тебе досталась глючная версия Сафари, которая падает через несколько секунд, после того, как сама внутри свяжется с серверами Apple и проверит какие-то обновления. Повлиять на это никак нельзя, на сервера лезет именно сам браузер, настроек для отключения причин падения нет. Ты написал здоровский сервис техподдержки, помогающим людям избавиться от истерики, связанной с совпадением ста неприятностей в один момент времени, путём решения всех его проблем. Для решения очередной проблемы вам позарез необходим скриншот телефона вашего клиента. Место на его телефоне почти закончилось, благо, на скриншот хватит. Удалять больше нечего - он только что забил весь телефон видео-свидетельствами очевидца наблюдения пришельцев. Ничего

@avesus
avesus / about-me.md
Created January 26, 2016 21:15
About Me

Я гуру разработки на C++, фанат и практик CI/CD, Agile, Microservices, Node.js, WebSockets, VP8, P2P, IP sockets. Адекватный архитектор великолепно работающих в продакшене решений. "Handy" с Web-технологиями (Flux, React, Marionette) и БД (Postgres, Mongo, SQL Server, MySQL). Изучаю вопрос применения Redis в качестве сессионного кеша и архитектуру мониторинга микросервисов. Прекрасно знаю, как работает интернет и чего стоит то или иное решение. Дружу со всеми коллегами. Карьеру руководителя специально не строил, но во всех компаниях занимался по факту огромным количеством координирующей работы и проектированием, то есть, по-сути, принимал много технических решений (и даже давал советы с маркетинговыми решениями). Последние два места могу охарактеризовать "анархо"-"демократичными"-самоорганизующимися, то есть, руководители здесь не в моде. Собеседовал кучу народа, составлял объявления на hh.ru, пришёл к выводу что программисты в Москве так себе (ну или работал в непривлекательных компаниях).

Постоянно учусь н

@avesus
avesus / repl-client.js
Created February 1, 2016 17:53 — forked from TooTallNate/repl-client.js
Running a "full-featured" REPL using a net.Server and net.Socket
var net = require('net')
var sock = net.connect(1337)
process.stdin.pipe(sock)
sock.pipe(process.stdout)
sock.on('connect', function () {
process.stdin.resume();
process.stdin.setRawMode(true)
@avesus
avesus / tfa.md
Created March 11, 2016 18:39
The final thoughts.

Effect name, effect arguments and complete current state are passed into present() function, which will filter out the necessary data to create a stale data and state representation useful for passing into corresponding effect execution function. For a single effect, application can be configured to have multiple present() functions, which will adapt state and effect arguments into arguments for a particular presentation function. Application can be configured to use different multiple presenters even for the same present() effect arguments and state convertation.

Component's init() function have to be supplied with external pluggable Effects mapping, for every component's effect it should be at least one (assigned by list) presenter, which will implement action predicate interface. For each effect, it could be a list of state adapt functions, for each state adapt function, it could be a list of presenters supplied externally. All presenters, even console.log(), have to be supplied externally as dependencies

@avesus
avesus / why-my-ai-alive.md
Created April 24, 2016 23:42
Why my AI idea definitely becomes the first true AI with consciousness

(c) Ivan Borisenko 2016. All rights reserved.

A compression algorithm, simultaneously is a computing engine has a simple target function: 'To increase internal order, to decrease entropy changes (to preserve internal complexity or simplicity)'

@avesus
avesus / object-watch.js
Created May 3, 2016 13:22 — forked from eligrey/object-watch.js
object.watch polyfill in ES5
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/