- Ушел из компании мечты (фейл, пришлось), а потом ее купила Airbnb (вин);
- Запустил второй проект на Эрланге в продакшн (трекер общественного транспорта, щас он уже все);
- Для этого проекта на Эрланге сделал красивое приложение для Windows Phone в продакшн (прям качали с магазина);
- Затащил лучшего друга в программирование, всячески ему помогал и сейчас он уже на зарплате;
- Затащил этот проект с трекингом транспорта в дипломную и защитил на отлично, закончил универ;
- Попал в сильную команду рубистов, там немного научили в DDD и поставили на путь, куда идти дальше в ООП;
- Попал в другую сильную команду рубистов, где хорошо прокачал теорию и практику распределенных систем;
- Возненавидел тех, кто использует Elasticsearch не по назначению (никогда в жизни не устану это повторять, это травма);
- Прокачался во фронтенде (react, babel и все такое модное с БД на клиенте и иммутабельными стейтами);
- Попал в команду ROM, написал два адаптера в продакшн (rom-elasticsearch, rom-redis) и один для себя (rom-rethin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN; | |
drop index <IDX_NAME>; | |
create index test_1 on <TABLE> (...); | |
create index test_2 on <TABLE> (...) where field = true; | |
EXPLAIN ANALYZE <QUERY> | |
ROLLBACK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule BinaryRefc do | |
def run(take \\ 50, sort_by \\ :pids_count) do | |
ref_procs = | |
Enum.reduce(Process.list(), %{}, fn(pid, acc) -> | |
[binary: refc_list] = Process.info(pid, [:binary]) | |
Enum.reduce(refc_list, acc, fn({ref, size, _count}, acc) -> | |
acc | |
|> Map.put_new({ref, size}, []) | |
|> Map.update!({ref, size}, fn(list) -> [pid | list] end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.config/fish/functions/fish_prompt.fish | |
# name: Robbyrussell edited | |
# author: Bruno Ferreira Pinto, edit by Yuri Artemev | |
function fish_prompt | |
if not set -q -g __fish_robbyrussell_art_functions_defined | |
set -g __fish_robbyrussell_art_functions_defined | |
function _git_branch_name | |
echo (git rev-parse --abbrev-ref HEAD ^/dev/null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GemfileParser | |
attr_reader :gemfile | |
EXCLUDED = ["rails"] | |
def self.gems_status gemfile | |
new(gemfile).gems_status | |
end | |
def initialize gemfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BaseWall | |
def self.Wall length, width, material | |
Module.new do | |
define_method(:length) { length } | |
define_method(:width) { width } | |
define_method(:material) { material } | |
def self.included clazz | |
private :length, :width, :material | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# string merging | |
"asd" "qwe" "zxc" | |
# => "asdqwezxc" | |
# separators may be a space | |
% sometext .size | |
# => 8 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lager:debug("throughput ~p num/s", [length(State)]). | |
% transforms to | |
case {whereis(lager_event), whereis(lager_event), lager_config:get({lager_event, loglevel}, {0, []})} of | |
{undefined, undefined, _} -> | |
fun () -> {error, lager_not_running} end(); | |
{undefined, _, _} -> | |
fun () -> {error, {sink_not_configured, lager_event}} end(); | |
{__Pidfb_throughput43, _, {__Levelfb_throughput43, __Tracesfb_throughput43}} when __Levelfb_throughput43 band 128 /= 0 orelse __Tracesfb_throughput43 /= [] -> | |
lager:do_log(debug, [{application, fb}, {module, fb_throughput}, {function, handle_info}, {line, 43}, {pid, pid_to_list(self())}, {node, node()} | lager:md()], "throughput ~p num/s", [length(State)], 4096, 128, __Levelfb_throughput43, __Tracesfb_throughput43, lager_event, __Pidfb_throughput43); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
APP=<application_name> | |
USER=user | |
ROOT=/home/$USER/apps/$APP/_rel/$APP | |
export HOME=/home/$USER | |
exec 2>&1 | |
exec chpst -u $USER $ROOT/bin/$APP foreground |
NewerOlder