Skip to content

Instantly share code, notes, and snippets.

View arunkjn's full-sized avatar

Arun Kumar Jain arunkjn

View GitHub Profile
@arunkjn
arunkjn / index.html
Last active August 11, 2017 06:41 — forked from Sokrates86/index.html
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;
}
@arunkjn
arunkjn / pixelScript.js
Created July 3, 2015 15:08
annotated pixel script
//declaring an anonymous self executing function
//this function is declared and immediately executed
//@Parameters - t= window, e= document
! function(t, e) {
// if FQTag is not present in window object already, initialize it with following function
// the argument to this function 'o' is of the form as shown below-
// {
// "org": "keswu4ug7detrumayur3",
// "s": "${AUCTION_ID}",
// "p": "${SELLER_MEMBER_ID}",
@arunkjn
arunkjn / index.html
Last active August 29, 2015 14:02 — forked from mbostock/.block
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
</head>
<body>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.6.0"></script>
<script type="text/javascript">
var svg = d3.select("body").append("svg")
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://d3js.org/d3.v2.js"></script>
<script type="text/javascript" src="https://rawgithub.com/cfergus/d3-plugins/master/sankey/sankey.js"></script>
<title>Sankey Diagram</title>
<style>
@arunkjn
arunkjn / index.html
Last active August 29, 2015 14:01 — forked from kunalb/index.html
<html>
<head>
<title>Cyclic Sankeys</title>
<style type="text/css">
#chart {
height: 500px;
}
.node rect {
cursor: move;
@arunkjn
arunkjn / index.html
Last active August 29, 2015 13:58
sankey
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>Sankey Diagram</title>
<style>
@import url(style.css);
#chart {
height: 500px;

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

@arunkjn
arunkjn / example.js
Last active December 28, 2015 15:59
BI Usage Example
// Declare AiqBiViz as a dependency of your application module
var app = angular.module('myApplication', ['AiqBiViz']);
//Configure the bi module in your config block
app.config(function($biConfigProvider){
//pass all configuration parameters as a single JSON
$biConfigProvider.init({
url: "http://theUrlToBiServiceApi.com"
});
@arunkjn
arunkjn / example.html
Last active December 28, 2015 15:49
IPC Demo
<div ng-controller="IpcDemoCtrl">
<!-- Suppress firstname and supply lastname from scope.ipcLastName variable -->
<bi-report id="{{reportID}}" ip-firstname ip-lastname="ipcLastName"></bi-report>
<!-- Supply absolute value (or direct value) of lastname input control -->
<bi-report id="{{reportID}}" ip-abs-lastname="STALLONE;WAHLBERG;DEGENERES"></bi-report>
<!-- Supply absolute value (or direct value) of firstname input control -->
<bi-report id="{{reportID}}" ip-abs-firstname="NICK"></bi-report>
@arunkjn
arunkjn / example.html
Last active December 28, 2015 07:49
Report Demo
<div ng-controller="ReportDemoCtrl">
<bi-report id="{{my_report_id}}"></bi-report>
</div>