Skip to content

Instantly share code, notes, and snippets.

@Zatvobor
Zatvobor / gist:2c187b5363ca8b3141ce
Last active Nov 17, 2015
Ubuntu 14.04.3 LTS, AMD A10-7870K: `clinfo` throws `Segmentation fault (core dumped)` after second attempt.
View gist:2c187b5363ca8b3141ce
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 Dec 26, 2016
SIAD Dockerfile
View 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
DASHD Dockerfile
View 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 Mar 3, 2015
ShadowDom: Shadow hole
View index.html
<!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 Aug 29, 2015
Ember-Insights.js: Task Success metrics
View app.js
// 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 Feb 20, 2015
Ability to use Multiple Trackers for tracking the same users behavior
View gist:a10851906923e60b8a05
EmberInsights.configure('development')
.track({
trackerFactory: EmberInsights.ATracker.factory,
insights: EmberInsightsMapping.development.insights,
})
.track({
trackerFactory: EmberInsights.BTracker.factory,
insights: EmberInsightsMapping.development.insights,
});
View gist:10483850
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 Aug 29, 2015
Ember.js inception case
View gist:10106907

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;
View gist:8801207
/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
View gist:5403164
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