Skip to content

Instantly share code, notes, and snippets.

View zmaril's full-sized avatar
🌹
Crawling the web

Zack Maril zmaril

🌹
Crawling the web
View GitHub Profile
(ns instagenerate.strlenc
(:refer-clojure :exclude [==])
(:require [clojure.core.logic :as l :refer [run* fresh ==]]
[clojure.core.logic.protocols :as lp])
(:import [clojure.core.logic LCons]))
(defn lcount [l]
(loop [i 0 l l]
(println i l)
(if (and (= LCons (type l)) (.d l))
@zmaril
zmaril / debate-twitter-stream.js
Created October 17, 2012 04:29 — forked from tcr/debate-twitter-stream.js
See a streaming list of all tweets concerning the presidential debate.
// npm install rem read clarinet
var rem = require('rem');
var read = require('read');
var clarinet = require('clarinet');
// Create Twitter API, prompting for key/secret.
var tw = rem.load('twitter', 1.0).prompt();
// Authenticate user via the console.
rem.console(tw, function (err, user) {
@zmaril
zmaril / index.coffee
Created July 13, 2012 18:46 — forked from zmaril/fisheye.js
Rotating rectangles
graphic = new Object
size = null
number = null
graphic.create = ()->
width = $(document).width()/2
height = $(document).height()*.85
size = d3.min([width,height])
graphic.svg = d3.select("#graphic")
.append("svg")
@zmaril
zmaril / index.html
Created June 28, 2012 16:09 — forked from zmaril/index.html
d3 bootstrap popovers
<!doctype html>
<head>
<style>
body {
font: 10px sans-serif;
}
#main {
left: 25%;
position: absolute;
}
@zmaril
zmaril / BubbleChart.js
Created June 24, 2012 22:39
Animated Bubble Chart
var BubbleChart, root,
__bind = function(fn, me){
return function()
{ return fn.apply(me, arguments);
};
};
BubbleChart = (function() {
BubbleChart.name = 'BubbleChart';
@zmaril
zmaril / index.html
Created June 24, 2012 15:57 — forked from njvack/LICENSE
Voronoi-based point picker
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js"></script>
</head>
<body>
<div id="chart">
</div>
<script type="text/javascript">
var w = 960,
@zmaril
zmaril / index.html
Created June 24, 2012 03:16 — forked from mbostock/.block
d3 bootstrap tooltips
<!doctype html>
<head>
<style>
body {
font: 10px sans-serif;
}
#main {
left: 25%;
position: absolute;
}
@zmaril
zmaril / index.html
Created June 16, 2012 14:08 — forked from ilyabo/index.html
D3 tooltip using Bootstrap
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src=https://raw.github.com/gist/2941416/24172d26b3c802f5be54b3411863822cad6b8538/tooltip.custom.js"></script>
<script type="text/javascript" src="https://raw.github.com/gist/2941416/39fbe358eb3256e62401e2403735907fbe3f7a75/popover.js"></script>
</head>
<body>
<div id="chart"></div>