Skip to content

Instantly share code, notes, and snippets.

View a10k's full-sized avatar

Alok Pepakayala a10k

View GitHub Profile
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Venn Diagrams with D3.js</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://www.benfrederickson.com/venn-diagrams-with-d3.js/" />
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
@a10k
a10k / index.html
Created November 30, 2015 10:49
uk temp
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>UK Temperature History</title>
<link rel="stylesheet" href="http://charts.animateddata.co.uk/uktemperaturelines/css/reset.css">
<link rel="stylesheet" href="http://charts.animateddata.co.uk/uktemperaturelines/css/style.css">
<style>
body,html{
background-color: #fff
@a10k
a10k / d3.v3.min.js
Created December 4, 2015 04:26
Amol
!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[]
@a10k
a10k / .hostTest
Last active February 10, 2016 14:09
test
hosting map viz
<!DOCTYPE html>
<html>
<body>
<script src="https://cdn.firebase.com/js/client/2.4.1/firebase.js"></script>
<script type="text/javascript">
var fb = new Firebase("https://radiant-fire-5095.firebaseio.com");
fb.child('name').on('value',function(d){console.log(d.val())});
fb.set({'name':'alok'});
</script>
#Select both the consecutive duplcate lines on sublime
(?s)(.*)\n\1
@a10k
a10k / DUP-svg-transform.pl
Last active January 3, 2017 09:43
DUP SVG Optimization script
my $file = @ARGV[0];
my $text = do {
local $/ = undef;
open my $fh, "<", $file
or die "could not open $file: $!";
<$fh>;
};
@a10k
a10k / upload.html
Created February 16, 2021 06:11
clipboard
<! DOCTYPE html>
<html>
<body>
<form action="http://localhost:8000/UPLOAD" method="post" enctype="multipart/form-data">
<input type="file" name="word" id="word" />
<input type="file" name="template" id="template" />
<input type="submit" value="Upload files" name="submit" />
</form>
</body>
</html>
// https://observablehq.com/@a10k/preact-setup@921
export default function define(runtime, observer) {
const main = runtime.module();
main.variable(observer()).define(["Render","htm","Comp"], function(Render,htm,Comp)
{
//borrowed from https://observablehq.com/@observablehq/bannertitles
const pageTitle = "Preact Observable Setup";
const title1 = "Preact Observable";
const title2 = "Setup";