Skip to content

Instantly share code, notes, and snippets.

View indrekj's full-sized avatar

Indrek Juhkam indrekj

View GitHub Profile
import R from 'ramda';
import Rx from 'rx';
import logger from './logger';
import Phoenix from 'phoenix';
const STATS_NAMESPACE = 'sm.app.operator_api.pubsub';
const CONNECTION_METRIC = `${STATS_NAMESPACE}.connection`;
const PUSH_METRIC = `${STATS_NAMESPACE}.push`;
const CRASH_REASON = 'join crashed';
const MAX_32_BIT_INTEGER = 2147483647;
curl --request POST \
--header "Authorization: Token $TOKEN" \
--header "Accept: application/vnd.salemove.v1+json" -d '
{
"query_type": "group_by",
"dimensions": ["operator_id", "queue_id"],
"granularity": "all",
"start_date": "2019-02-21T00:00:00Z",
"end_date": "2019-02-22T00:00:00Z",
"filter": {
curl --request POST \
--header "Authorization: Token $TOKEN" \
--header "Accept: application/vnd.salemove.v1+json" -d '
{
"query_type": "group_by",
"dimensions": ["operator_id", "type", "queue_id"],
"granularity": "all",
"start_date": "2019-02-21T00:00:00Z",
"end_date": "2019-02-22T00:00:00Z",
"filter": {
curl --request POST \
--header "Authorization: Token $TOKEN" \
--header "Accept: application/vnd.salemove.v1+json" -d '
{
"query_type": "group_by",
"dimensions": ["operator_id"],
"granularity": "all",
"start_date": "2019-02-21T00:00:00Z",
"end_date": "2019-02-22T00:00:00Z",
"filter": {
@indrekj
indrekj / query2.sh
Last active February 21, 2019 09:54
curl --request POST \
--header "Authorization: Token $TOKEN" \
--header "Accept: application/vnd.salemove.v1+json" -d '
{
"query_type": "group_by",
"dimensions": ["operator_id", "type"],
"granularity": "all",
"start_date": "2019-02-21T00:00:00Z",
"end_date": "2019-02-22T00:00:00Z",
"filter": {
@indrekj
indrekj / query1.sh
Last active February 21, 2019 09:51
curl --request POST \
--header "Authorization: Token $TOKEN" \
--header "Accept: application/vnd.salemove.v1+json" -d '
{
"query_type": "group_by",
"dimensions": ["operator_id", "type"],
"granularity": "all",
"start_date": "2019-02-21T00:00:00Z",
"end_date": "2019-02-22T00:00:00Z",
"filter": {
* parse_trans 3.2.0 (Hex package) (rebar3)
locked at 3.2.0 (parse_trans) 2adfa4da
ok
* deferred_config 0.1.1 (Hex package) (mix)
locked at 0.1.1 (deferred_config) ec912e9e
ok
* confex 3.3.1 (Hex package) (mix)
locked at 3.3.1 (confex) 8febaf75
ok
* base64url 0.0.1 (Hex package) (rebar)
Mutant configuration:
Matcher: #<Mutant::Matcher::Config match_expressions=[<Mutant::Expression: Substation::Chain::DSL>] subject_ignores=[] subject_selects=[]>
Integration: rspec
Expect Coverage: 100.00%
Processes: 8
Substation::Chain::DSL#build:/Users/indrek/gems/substation/lib/substation/chain/dsl.rb:94
- rspec:Substation::Chain::DSL#build
evil:Substation::Chain::DSL#build:/Users/indrek/gems/substation/lib/substation/chain/dsl.rb:94:6353c
@@ -1,4 +1,4 @@
-def build(name = nil, other, exception_chain, &block)
/Users/indrek/.rvm/rubies/ruby-1.9.3-p545/bin/ruby -I/Users/indrek/.rvm/gems/ruby-1.9.3-p545@substation/gems/rspec-core-3.0.0/lib:/Users/indrek/.rvm/gems/ruby-1.9.3-p545@substation/gems/rspec-support-3.0.3/lib -S /Users/indrek/.rvm/gems/ruby-1.9.3-p545@substation/gems/rspec-core-3.0.0/exe/rspec spec/unit/substation/chain/definition_spec.rb spec/unit/substation/chain/dsl/config/dsl_module_spec.rb spec/unit/substation/chain/dsl/config/registry_spec.rb spec/unit/substation/chain/dsl/config_spec.rb spec/unit/substation/chain/dsl/module_builder_spec.rb spec/unit/substation/chain/dsl_spec.rb spec/unit/substation/chain_spec.rb spec/unit/substation/dispatcher_spec.rb spec/unit/substation/dsl/guard_spec.rb spec/unit/substation/dsl/registry_spec.rb spec/unit/substation/environment/dsl_spec.rb spec/unit/substation/environment_spec.rb spec/unit/substation/processor/builder_spec.rb spec/unit/substation/processor/config_spec.rb spec/unit/substation/processor/evaluator/handler_spec.rb spec/unit/substation/processor/evaluato

/Users/indrek/.rvm/rubies/ruby-1.9.3-p545/bin/ruby -I/Users/indrek/.rvm/gems/ruby-1.9.3-p545@substation/gems/rspec-core-3.0.0/lib:/Users/indrek/.rvm/gems/ruby-1.9.3-p545@substation/gems/rspec-support-3.0.3/lib -S /Users/indrek/.rvm/gems/ruby-1.9.3-p545@substation/gems/rspec-core-3.0.0/exe/rspec spec/unit/substation/chain/definition_spec.rb spec/unit/substation/chain/dsl/config/dsl_module_spec.rb spec/unit/substation/chain/dsl/config/registry_spec.rb spec/unit/substation/chain/dsl/config_spec.rb spec/unit/substation/chain/dsl/module_builder_spec.rb spec/unit/substation/chain/dsl_spec.rb spec/unit/substation/chain_spec.rb spec/unit/substation/dispatcher_spec.rb spec/unit/substation/dsl/guard_spec.rb spec/unit/substation/dsl/registry_spec.rb spec/unit/substation/environment/dsl_spec.rb spec/unit/substation/environment_spec.rb spec/unit/substation/processor/builder_spec.rb spec/unit/substation/processor/config_spec.rb spec/unit/substation/processor/evaluator/handler_spec.rb spec/unit/substation/processor/evaluato