Skip to content

Instantly share code, notes, and snippets.

View sudodoki's full-sized avatar

Джон, просто Джон sudodoki

View GitHub Profile
@sudodoki
sudodoki / Prolific_contirbutors.md
Last active August 29, 2015 14:03
One of phrases from discussing TJ leaving node thread.
function minErr(module) {
return function () {
var code = arguments[0],
prefix = '[' + (module ? module + ':' : '') + code + '] ',
template = arguments[1],
templateArgs = arguments,
stringify = function (obj) {
if (typeof obj === 'function') {
return obj.toString().replace(/ \{[\s\S]*$/, '');
} else if (typeof obj === 'undefined') {
@sudodoki
sudodoki / person.js
Last active August 29, 2015 14:03
Schema to get person object output with registered Date being larget than createdOn
[
'{{repeat(20, 30)}}',
{
id: '{{index()}}',
lastName: '{{surname()}}',
firstName: '{{firstName()}}',
age: '{{integer(20, 40)}}',
email: '{{email()}}',
createdOn: '{{created = date(new Date(2014, 0, 1), new Date()).toISOString()}}',
registered: '{{date(new Date(Date.parse(created)), new Date()).toISOString()}}',
19:42 alexspeller: spenguin: imagine the controller layer as a spiderweb with flies on
19:42 alexspeller: spenguin: controllers are like the webbing and the struggling flies are your data
19:43 spenguin: right
19:43 alexspeller: spenguin: the routing layer is the spider. The spider responds to the weather (i.e. URL changes, user input, websocket events, etc etc) by moving flies around (setting controller content to various data)
19:45 alexspeller: due to convention a lot of this is automatic (hitting /posts/1 will find Post id 1 and set the model property of the PostController to that post for example) but it doesn't have to be automatic
19:45 alexspeller: you can override setupController to set the post model to a different controller or you can override model hook so PostRoute finds a different model or multiple models or no model
19:46 alexspeller: the strands of the web are "needs". They connect controllers together.
19:48 alexspeller: So don't get confused by thinking there should always be a 1:1 relatio
@sudodoki
sudodoki / google_app_script.js
Last active August 29, 2015 14:03
google app script code to get count of open issue on github
// githubHandlerRepo ~ string "%organizationName%/%repoName%
function getOpenIssues(githubHandlerRepo) {
var url = 'https://api.github.com/repos/' + githubHandlerRepo + '/issues?state=open'
var response = JSON.parse(UrlFetchApp.fetch(url));
return response.length;
}

Kottans DIY/roboclub meeting #1

Bender

В субботу (19/07/14) в Киевском офисе Cogniance, по адресу ул. Боженко (она же Малевича) 86-О состоится первая встреча, посвященная роботехнике/CC*. Начало в 11-00, продолжительность ~2 часа. В программе: 1. [Сергей](https://twitter.com/pogorelov_ss) проведет ликбез по промышленной автоматизации и роботах в ней. 2. [Джон](https://twitter.com/sudodoki) расскажет про стартер-киты и историю NodeBots. 3. [Юджин](https://twitter.com/sejoker) расскажет про свой небольшой проект на базе ардуино. 4. [Фил](https://twitter.com/wtfil) расскажет про собраного им дрона.

Если вы хотите посетить мероприятие, пожалуйста, кликнете пару кнопок в форме и ждем вас завтра.

var states = "|/-\\";
var run;
var i = 0;
module.exports = {
indicate: function () {
run = true;
return tick();
},
stop: function () {
Aleph property Chance.js method
'flag' 'bool'
'char' 'character'
'fullDescription' 'paragraph'
'shortDescription' 'sentence'
'abbr' 'syllable'
'acronym' 'radio'
'word' 'word'
'percents' 'klout'
@sudodoki
sudodoki / Some_tools_icon_fonts.md
Last active August 29, 2015 14:07
Some tools for icon font

So, some tools that might help with icon fonts:

  1. Build fonts from existing glyphs:
    [IcoMoon][1] — meta-resource, using font-awesome & other fonts, either publicly available or purchasable
    [flaticon][2]

  2. Build fonts from your own images online, but needs editing special template:
    [IconVault][3]

  3. Something in between:
    [Fontastic][4]

@sudodoki
sudodoki / Few_shortest.md
Last active August 29, 2015 14:08
Few shortest repo names on Github