Skip to content

Instantly share code, notes, and snippets.

View Zatvobor's full-sized avatar

Alexey Zatvobor

  • Software engineer
  • CET
View GitHub Profile
/opt/roundscope/roscredit-app   rc  curl -v -u [FILTERED]:[FILTERED] "https://www.kp-dealer.ru:8080/KPDealerWeb/KPBossHttpServer?actionName=PROVIDERS2" | grep "<provider>" | wc -l
* About to connect() to www.kp-dealer.ru port 8080 (#0)
* Trying 31.13.17.134...
* Adding handle: conn: 0x7fc8f2805400
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fc8f2805400) send_pipe: 1, recv_pipe: 0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
@Zatvobor
Zatvobor / gist:10106907
Last active August 29, 2015 13:58
Ember.js inception case

The purpose: Check the understanding of core principles

In general: Prioritized TODO lists

In order to prioritize my own activities and manage my personal best. I want to have ability to submit tasks into MUST, SHOULD and COULD queues.

Acceptance criteria, application should:

  • be available from plain index.html and should not have any jQuery based snippets;
  • use DS.FixtureAdapter;
function Human (sex, age, name) {
this.sex = sex;
this.age = age;
this.name = name;
}
Human.prototype.say = function() {
console.log('my name is ' + this.name);
};
@Zatvobor
Zatvobor / gist:a10851906923e60b8a05
Created February 20, 2015 15:07
Ability to use Multiple Trackers for tracking the same users behavior
EmberInsights.configure('development')
.track({
trackerFactory: EmberInsights.ATracker.factory,
insights: EmberInsightsMapping.development.insights,
})
.track({
trackerFactory: EmberInsights.BTracker.factory,
insights: EmberInsightsMapping.development.insights,
});
@Zatvobor
Zatvobor / app.js
Last active August 29, 2015 14:16
Ember-Insights.js: Task Success metrics
// The Example App is abstract implementation as a show case of getting the 'Task Success' metric.
// The Task Success: this includes traditional behavioral metrics of user experience,
// such as efficiency (e.g. time to complete a task), effectiveness (e.g. percent of tasks completed), and error rate.
// This category is most applicable to areas of your product that are very task-focused, such as search or an upload flow.
App = Ember.Application.create({rootElement: applicationContainer});
App.Router.map(function() {
this.resource('index', { path: '/' });
this.resource('execution', { path: '/execution' });
this.resource('result', { path: '/result' });
@Zatvobor
Zatvobor / index.html
Created March 3, 2015 10:04
ShadowDom: Shadow hole
<!doctype html>
<html class="no-js" lang="en">
<head>
<style>
h1, h2, h3 {5
color: red;
}
</style>
<template>
<h2>h2</h2>
@Zatvobor
Zatvobor / gist:2c187b5363ca8b3141ce
Last active November 17, 2015 14:11
Ubuntu 14.04.3 LTS, AMD A10-7870K: `clinfo` throws `Segmentation fault (core dumped)` after second attempt.
root@eva:~# dpkg -i fglrx-core_15.201-0ubuntu1_amd64_UB_14.01.deb
Selecting previously unselected package fglrx-core.
(Reading database ... 87607 files and directories currently installed.)
Preparing to unpack fglrx-core_15.201-0ubuntu1_amd64_UB_14.01.deb ...
Unpacking fglrx-core (2:15.201-0ubuntu1) ...
Setting up fglrx-core (2:15.201-0ubuntu1) ...
update-alternatives: using /usr/lib/fglrx-core/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GFXCORE.conf (x86_64-linux-gnu_gfxcore_conf) in auto mode
Loading new fglrx-core-15.201 DKMS files...
First Installation: checking all kernels...

0.7.0

Aleksey-Zatvors-MacBook-Pro:/opt/datahogs/couch_normalizer[master]$ make test

PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/alekseyzatvor/.rvm/bin:deps/elixir/bin mix test
………………………………

[pid: <0.92.0>, module: :“Users_alekseyzatvor_opt_datahogs_couch_normalizer_examples_1-example-scenarioexs”, new_index: 0, new_uniq: <<35,143,117,154,121,211,79,108,11,187,58,28,226,5,32,166>>, index: 0, uniq: 18643884, name: :“BOOTSTRAP/2-fun-1”, arity: 4, env: [], type: :local]
[pid: <0.92.0>, module: CouchNormalizer.ElixirUpdateIssueTest, new_index: 0, new_uniq: <<151,32,187,217,189,138,168,87,193,166,89,51,157,56,220,21>>, index: 0, uniq: 79234526, name: :“setup/1-fun-0”, arity: 4, env: [], type: :local]

@Zatvobor
Zatvobor / simple_couch_db_doc_behavior.erl
Last active December 12, 2015 06:58
Erlang R15B03, CouchDB branch#1.2.x 1] Why `in_case(single_process)` produces so many `inactive` memory on Mac OS X in case when `<<"medianet:album:10000053">>` document size is 67.19Kb?. besides, `in_case(spawned_processes)` doesn't; 2] moreover, `in_case(spawned_update_processes)` still continue produce an `inactive` memory;
-module(simple_couch_db_doc_behavior).
-compile(export_all).
db_and_doc() ->
{<<"seed_labeled_prod">>, <<"medianet:album:10000023">>}.
read_write() ->
{DbName, DocId} = db_and_doc(),
{ok, Db} = couch_db:open_int(DbName, []),
@Zatvobor
Zatvobor / gist:5003806
Created February 21, 2013 10:36
Time taken for tests: 14.231 seconds Complete requests: 10000 Failed requests: 81 (Connect: 0, Receive: 0, Length: 81, Exceptions: 0) Write errors: 0 Time per request: 1.423 [ms] (mean, across all concurrent requests)
$ ab -c 100 -n 10000 http://accounts.tunehog.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking accounts.tunehog.com (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests