понедельник, 18 июля 2016 г.

Scaffolding a Suave app with Yeoman for Visual Studio code

Suave is a simple web development F# library providing a lightweight web server and a set of combinators to manipulate route flow and task composition.

F# in Visual Studio Code

I'm a little bit an IDE-kid and aware of such things like Emacs and Vim however I learned a number of fancy tricks in wonderful Sublime Text and I can edit a line in Vim and then exit it without having an insult. At the same time, I see no point in choosing a text editor over an IDE in my daily works because, you know, performance matters. My performance, not my laptop's (sorry, Greg)
But sometimes you want something different.

пятница, 1 июля 2016 г.

ReSharper does not build tests on run

It tool some time for me to figure out the reason, and the internet is full of advices to play with platform and framework and “run every assembly is separate app domain” settings. In my case the issue was this setting value:


Stupid thing, hard to find, impossible to trace.

понедельник, 7 марта 2016 г.

new project on GitHub

Ok, here is a new project on GitHub: ep_activepads. It is a plugin for superb collaborative text editor etherpad-lite that lists all pads people are working on right now. It is highly inspired by ep_adminpads plugin.

What I would like to add alter is data auto update, probably with the simple timer on client side.

To install the plugin, clone it into node_modules/ep_activepads folder of your etherpad installation, terminal there and do npm install.

воскресенье, 7 февраля 2016 г.

Snooker “get remaining points” small Erlang thing

Just a little reminder for myself on Erlang module structure and common mistakes I’ve made composing this. It is a little Erlang module calculating how many points are on the snooker table. Number of the red balls in represented as integer, color balls are atoms.



get_points(NumberOfReds) when is_integer(NumberOfReds) -> get_points(NumberOfReds, 0);
get_points(0) -> get_points(yellow, 0);
get_points(yellow) -> get_points(yellow, 0);
get_points(green) -> get_points(green, 0);
get_points(brown) -> get_points(brown, 0);
get_points(blue) -> get_points(blue, 0);
get_points(pink) -> get_points(pink, 0);
get_points(black) -> get_points(black, 0).

get_points(NumberOfReds, Total) when is_integer(NumberOfReds) andalso NumberOfReds =/= 0 -> get_points(NumberOfReds - 1, Total) + 1 + get_points(black);
get_points(0, Total) -> get_points(yellow, Total);
get_points(yellow, Total) -> get_points(green, Total) + 2;
get_points(green, Total) -> get_points(brown, Total) + 3;
get_points(brown, Total) -> get_points(blue, Total) + 4;
get_points(blue, Total) -> get_points(pink, Total) + 5;
get_points(pink, Total) -> get_points(black, Total) + 6;
get_points(black, Total) -> Total + 7.

воскресенье, 19 апреля 2015 г.

SourceTree: git status code 128

If  your SourceTree complains on startup saying that 'git status' failed with code 128: fatal: Not a git repository (or any of the parent directories): .git (Here some folder) most likely the problem is that you have deleted a repository while tab with the repository was opened. To solve this navigate to


open it with any text editor and remove line pointing to the repository SourceTree complains about. Save the file and restart SourceTree, the problem should disappear.

суббота, 26 июля 2014 г.

Совсем заканчиваем с атлетами и Олимпиадой. Вопрос 3.

Which countries have won the most number of medals in swimming?

Найти все страны, когда-либо получавшие медали в плавании, и отсортировать их по количеству медалей в плавании.
Это уже должно быть легко.