Skip to content

Instantly share code, notes, and snippets.

View aholachek's full-sized avatar

Alex Holachek aholachek

View GitHub Profile
@aholachek
aholachek / gist:3b3c80b4e3726880f8f86dfd7173d626
Last active December 9, 2016 21:40
Better HTML Starter Snippet for Atom
".text.html, .text.php":
"template":
"prefix": "html"
"body": """
<!DOCTYPE html>
<html lang="en-us" class="no-js">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta charset="utf-8">
<title>
define([
'js/components/api_targets',
'js/components/api_request',
'js/widgets/base/base_widget',
'hbs!./templates/hopper_template',
'bootstrap'
], function(
ApiTargets,
ApiRequest,
BaseWidget,
@aholachek
aholachek / README.md
Last active May 25, 2016 02:52
Accessible D3 Line Chart with the HTML Audio API + JQuery DataTables

Please use the "open block" link to the right to open in a new window, as the current view cuts off an important section of the page.

@aholachek
aholachek / README.md
Last active July 10, 2018 15:58
Sankey with animated gradient links
@aholachek
aholachek / README.md
Last active September 23, 2023 20:51
Calendar Day View Layout

##D3 Calendar Day View Layout

This script demonstrates a layout algorithm I developed for a day calendar view. The height and y-axis placement of each calendar item are solely determined by its start and end times, but the width and x-axis placement of each item is dependent on how many other items occur during the same time as it.

You can change the layout by adding items using the form to the left, or clicking on items to remove them.

###There are three main steps for the layout calculation:

@aholachek
aholachek / flare.json
Last active January 19, 2016 13:42
draggable partition
{
"name": "flare",
"children": [
{
"name": "analytics",
"children": [
{
"name": "cluster",
"children": [
{"name": "AgglomerativeCluster", "size": 3938},
gistup
@aholachek
aholachek / gist:dcb0400c7b72078f6671
Created September 23, 2014 14:54
Querying solr using requests library
SOLR_PATH = 'http://localhost:9000/solr/select/'
def query_solr(q = '', start = 0, rows = 200, fl = 'bibcode,title,recid,citation_count,year,property', sort = "date desc"):
d = {'q' : q,
'sort': sort,
'fl' : fl,
'start' : start,
'rows' : rows,