Skip to content

Instantly share code, notes, and snippets.

🤖
...

Nikolay Burlov kohgpat

🤖
...
  • Russia, Siberia
Block or report user

Report or block kohgpat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View delay.js
const delay = (ms) = new Promise(resolve => setTimeout(resolve, ms));
View gulp errors handle
var notify = require('gulp-notify');
function log() {
var args = Array.prototype.slice.call(arguments);
// Send error to notification center with gulp-notify
notify.onError({
title: 'Compile Error',
message: '<%= error %>'
}).apply(this, args);
View introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

View rover.rb
class Rover
attr_accessor :x, :y
def initialize(x, y, direction)
@x = x
@y = y
@direction = direction
@commands = []
end
View whiteboardCleaner.md

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

@kohgpat
kohgpat / gist:7260506
Created Nov 1, 2013
ruby mavericks gcc not found fix
View gist:7260506
xcode-select --install
brew install apple-gcc42
@kohgpat
kohgpat / app.css
Last active Dec 26, 2015
twitter bootstrap layout with sidebar
View app.css
/* twitter bootstrap */
.container {
max-width: 100%;
}
/* html */
html, body {
height: 100%;
}
View cv.md

Nikolay Burlov

Software Developer

kohgpat@gmail.com
@kohgpat at GitHub

Technologies

Backend development - Ruby, Sinatra, Ruby on Rails
Frontend development - CoffeeScript/JavaScript, jQuery, Angular.js
Databases - PostgreSQL, MySQL, MSSQL, MongoDB, Redis

@kohgpat
kohgpat / app.js
Created Sep 23, 2013
angular.js date filter using moment.js
View app.js
angular.module("app.users", ["ngResource"]).factory("Users", function($resource) {
return $resource("users.json", {}, {get: {method: "GET", isArray: true}});
});
angular.module("app.filters", []).filter("date", function() {
moment.lang("ru");
return function(date) {
return moment(new Date(date)).format("L");
};
@kohgpat
kohgpat / app.js
Created Sep 23, 2013
angular.js currency filter using accounting.js
View app.js
angular.module("app.users", ["ngResource"]).factory("Users", function($resource) {
return $resource("users.json", {}, {get: {method: "GET", isArray: true}});
});
angular.module("app.filters", []).filter("currency", function() {
return function(number, currencyCode) {
var currency = {
USD: "$",
RUB: ""
},
You can’t perform that action at this time.