Skip to content

Instantly share code, notes, and snippets.

View Zatvobor's full-sized avatar

Alexey Zatvobor

  • Software engineer
  • CET
View GitHub Profile
@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...
@Zatvobor
Zatvobor / siad.dockerfile
Last active December 26, 2016 15:37
SIAD Dockerfile
FROM phusion/baseimage
MAINTAINER Zatvobor <http://zatvobor.github.io>
RUN apt-get update \
&& apt-get install -y curl unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV SIA_VERSION 1.0.4
ENV SIA_RELEASE Sia-v$SIA_VERSION-lts-linux-amd64
@Zatvobor
Zatvobor / dashd.dockerfile
Last active May 20, 2017 12:59
DASHD Dockerfile
FROM ubuntu:14.04
MAINTAINER Zatvobor <http://zatvobor.github.io>
RUN apt-get update \
&& apt-get install -y curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
#RUN echo 'root:screencast' | chpasswd
@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 / 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 / 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,
});
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: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;
/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
WtiKioskCli::Labeled::MediaNetApi.get_track_info 74486245
{:success=>true, :data=>{"Success"=>true, "Track"=>{"MnetId"=>"74486245", "Title"=>"Everybody", "Artist"=>{"MnetId"=>"21540", "Name"=>"Madonna", "Images"=>{"Artist180x80"=>"http://images.mndigital.com/artists/000/021/540/b.jpeg", "Artist190x230"=>"http://images.mndigital.com/artists/000/021/540/c.jpeg", "Artist375x250"=>"http://images.mndigital.com/artists/000/021/540/a.jpeg", "Artist200x"=>"http://images.mndigital.com/artists/000/021/540/f.jpeg"}}, "Genre"=>"Rock", "ExplicitLyrics"=>false, "Duration"=>"2:49", "ReleaseDate"=>"11-29-2008", "TrackNumber"=>1, "DiscNumber"=>1, "PriceTag"=>{"Currency"=>"GBP", "Amount"=>0.79, "IsSetPrice"=>false, "WholesalePrice"=>0.54, "PublishingCost"=>0.09}, "Mp3Rights"=>{"CanSampleStream"=>true, "CanPurchaseDownload"=>true, "AlbumPurchaseOnly"=>false, "CanStream"=>false}, "FeaturedArtists"=>[{"MnetId"=>"78839", "Name"=>"Ariel Pink's Haunted Graffiti", "Images"=>{"Artist180x80"=>"http://images.mndigital.com/artists/000/0