Skip to content

Instantly share code, notes, and snippets.

View tamascsaba's full-sized avatar

Csaba Tamás tamascsaba

View GitHub Profile
@tamascsaba
tamascsaba / mac_xwindows_x11_xvfb_headless_firefox_howto.md
Created September 29, 2016 13:04 — forked from textarcana/mac_xwindows_x11_xvfb_headless_firefox_howto.md
Headless Selenium on CentOS 6.3 (Mac XWindows / X11 / Xvfb / Headless Firefox / Selenium howto)

XWindows for Headless Selenium

X Wing art by Paul Harckham

How to set up a Headless Selenium Testing environment for CentOS 6.3.

On your CentOS 6.3 host

Follow these steps to set up a CentOS 6.3 host to run headless Selenium tests with Firefox.

@tamascsaba
tamascsaba / ngrxintro.md
Created May 10, 2016 09:23 — forked from btroncone/ngrxintro.md
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series
[global_config]
enabled_plugins = CustomCommandsMenu, InactivityWatch, TestPlugin, ActivityWatch, TerminalShot, LaunchpadCodeURLHandler, APTURLHandler, MavenPluginURLHandler, LaunchpadBugURLHandler, LayoutManager
title_transmit_bg_color = "#832527"
[keybindings]
[profiles]
[[default]]
scrollback_lines = 4000
[layouts]
[[default]]
[[[child1]]]

chartFactory

/affini-tech/ChartFactory

Based on D3.JS and Dimple, ChartFactory provide the ability to build quickly D3.JS charts without coding any lines of javascript. Just define your dashboard in a JSON and voila !

charts: [
        {id:'chart1',
         width:800,height:250,

xAxis:{type:'Category',field: "Month",orderRule:'Date'},

This variation of a donut chart demonstrates how to add labels with lines and also works with missing/new data. Clicking on the button changes the displayed data.

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.25.0"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.time.js?1.25.0"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
</head>
<body>
<div id="chart"></div>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://d3js.org/d3.v2.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
<div id="chart"></div>
// Use the axis in the initialize method of your BarChart, like this:
d3.chart('BarChart', {
initialize: function() {
...
chart.xAxis = this.base.select('g').append('g').chart('xAxis', {parent: this});
this.attach('axis', chart.xAxis);
}
d3.chart('BaseChart').extend('LineChart', {
initialize: function () {
var chart = this
var lines = chart.base.append('g')
.classed('lines', true)
var line = d3.svg.line()
chart.xScale = d3.time.scale()
function getter(attr, scale) {
return function(d) {
return scale ? scale(d[attr]) : d[attr]
}
}
var defaults = {
width: 560,
height: 250,
x: 'x',