- Ушел из компании мечты (фейл, пришлось), а потом ее купила Airbnb (вин);
- Запустил второй проект на Эрланге в продакшн (трекер общественного транспорта, щас он уже все);
- Для этого проекта на Эрланге сделал красивое приложение для Windows Phone в продакшн (прям качали с магазина);
- Затащил лучшего друга в программирование, всячески ему помогал и сейчас он уже на зарплате;
- Затащил этот проект с трекингом транспорта в дипломную и защитил на отлично, закончил универ;
- Попал в сильную команду рубистов, там немного научили в DDD и поставили на путь, куда идти дальше в ООП;
- Попал в другую сильную команду рубистов, где хорошо прокачал теорию и практику распределенных систем;
- Возненавидел тех, кто использует Elasticsearch не по назначению (никогда в жизни не устану это повторять, это травма);
- Прокачался во фронтенде (react, babel и все такое модное с БД на клиенте и иммутабельными стейтами);
- Попал в команду ROM, написал два адаптера в продакшн (rom-elasticsearch, rom-redis) и один для себя (rom-rethin
This file contains hidden or 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
function ram | |
set -l sum 0 | |
set -l app $argv[1] | |
if [ -z $app ] | |
echo "First argument - pattern to grep from processes" | |
else | |
for i in (ps aux | grep -i "$app" | grep -v "grep" | awk '{print $6}') | |
set sum (math $sum + $i) | |
end |
This file contains hidden or 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 |
This file contains hidden or 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 hidden or 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 hidden or 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; |
OlderNewer