Skip to content

Instantly share code, notes, and snippets.

View arunkjn's full-sized avatar

Arun Kumar Jain arunkjn

View GitHub Profile
@arunkjn
arunkjn / example.html
Last active December 28, 2015 07:49
Dashboard Demo
<div ng-controller="DashboardDemoCtrl">
<bi-dashboard id="{{my_dashboard_id}}"></bi-dashboard>
</div>
@arunkjn
arunkjn / example.html
Last active December 28, 2015 07:39
Workbook Demo
<div ng-controller="WorkbookDemoCtrl">
<bi-workbook id="{{my_workbook_id}}"></bi-workbook>
</div>
@arunkjn
arunkjn / demo.js
Created July 29, 2013 20:16
Backbone global sync error handler
$(document).ajaxError(function(event, request, settings) {
//HANDLE GLOBAL AJAX ERRORS HERE
});
Backbone.originalSync = Backbone.sync;
Backbone.sync = function (method, model, options) {
var errorOverride = options.errorOverride;
if(errorOverride){
@arunkjn
arunkjn / demo.js
Last active December 20, 2015 09:19
Backbone Model global error hadling
Backbone.originalSync = Backbone.sync;
Backbone.sync = function (method, model, options) {
var errorOverride = options.errorOverride;
if(errorOverride){
options.errorOverride = function(resp){
errorOverride(model, resp, options);
model.trigger('error', model, resp, options);
@arunkjn
arunkjn / test_result.txt
Created July 19, 2013 23:26
PhantomJS pull request test result 4 tests failing https://github.com/ariya/phantomjs/issues/11419
Started
#0 phantom global object: should exist
PASS
#1 phantom global object: should have args property
PASS
#2 phantom global object: should have args as an array
PASS
#3 phantom global object: should have libraryPath property
PASS
var Routes = (function() {
var _ = {}, ctor = function(){};
_.bind = function bind(func, context) {
var bound, args, slice = Array.prototype.slice;
args = slice.call(arguments, 2);
return bound = function() {
if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
ctor.prototype = func.prototype;
var self = new ctor;
var result = func.apply(self, args.concat(slice.call(arguments)));
@arunkjn
arunkjn / README.md
Last active December 17, 2015 06:49 — forked from mourner/README.md

This is a D3.js Heatmap example showing how the highest sun position of the day (which directly correlates with average temperature) changes over the year depending on the latitude of the place. The actual temperature chart would be shifted to the right a bit beacuse of thermal lag.

The data for the chart is calculated using SunCalc.

<!DOCTYPE html>
<html>
<head>
<title>Chernoff Smileys</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.5.0"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.5.0"></script>
<style type="text/css">
</style>
</head>
@arunkjn
arunkjn / data.csv
Last active December 14, 2015 06:29 — forked from mbostock/.block
key value date
Group1 37 04/23/12
Group2 12 04/23/12
Group3 46 04/23/12
Group1 32 04/24/12
Group2 19 04/24/12
Group3 42 04/24/12
Group1 45 04/25/12
Group2 16 04/25/12
Group3 44 04/25/12
@arunkjn
arunkjn / index.html
Last active July 31, 2020 08:48
Multiple polygons with d3.js
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: auto;
position: relative;
width: 960px;
}