Skip to content

Instantly share code, notes, and snippets.

//See: https://github.com/VACLab/d3-tip
// d3.tip: Tooltips for d3.js Version 4, without ES6
// d3.tip
// Copyright (c) 2013 Justin Palmer
// ES6 / D3 v4 Adaption Copyright (c) 2016 Constantin Gavrilete
// Removal of ES6 for D3 v4 Adaption Copyright (c) 2016 David Gotz
//
// Tooltips for d3.js SVG visualizations
@steveodom
steveodom / athena_cheatsheet.md
Last active April 11, 2022 14:21
AWS Athena / Hive / Presto Cheatsheet

Useful Links / Sources

Housekeeping

change column type

ALTER TABLE logs.trades CHANGE recentprice price int;
@steveodom
steveodom / L.D3SvgOverlay.min.js
Last active December 13, 2016 20:32 — forked from xEviL/L.D3SvgOverlay.min.js
GeoJSON with Leaflet + D3 using L.D3SvgOverlay
/**
* Copyright 2015 Teralytics AG
*
* @author Kirill Zhuravlev <[email protected]>
*
*/
(function(factory){if(typeof define==="function"&&define.amd){define(["leaflet","d3"],factory)}else if(typeof module==="object"&&module.exports){module.exports=factory(require("leaflet","d3"))}else{factory(L,d3)}})(function(L,d3){if(typeof d3=="undefined"){throw"D3 SVG Overlay for Leaflet requires D3 library loaded first"}if(typeof L=="undefined"){throw"D3 SVG Overlay for Leaflet requires Leaflet library loaded first"}if(L.version>="1.0"){d3.select("head").append("style").attr("type","text/css").text("g.d3-overlay *{pointer-events:visiblePainted;}")}L.D3SvgOverlay=(L.version<"1.0"?L.Class:L.Layer).extend({includes:L.version<"1.0"?L.Mixin.Events:[],_undef:function(a){return typeof a=="undefined"},_options:function(options){if(this._undef(options)){return this.options}options.zoomHide=this._undef(options.zoomHide)?false:options.zoomHide;options.zoomDraw=this._undef(options.zoomDraw)?true:options.zoomDraw;r

I'm having trouble getting a virtualhost on port 80 to work.

I have 3 virtualhosts setup. One on localhost, one on testing.dev, and one on sto.dev, but at 8080 instead..

For each, I have the DocumentRoot pointing to my dev phunware directory where there is a simple index.html file.

The localhost virtualhost works -- I can see "hi" in my index.html file when I browse localhost.

sto.dev:8080 works -- I see "hi" ok too.

#!/usr/bin/env ruby
# Command line tool to add todos to a list. I use it for what I what to get accomplished in my pomodoro interval.
# The todo list is published as a gist so I have a record of all of them
# add as alias in bash_profile
# alias pomo='cd ~/Documents/projects && ./pomo.rb tasks'
require 'rubygems'
require 'commander/import'
require 'gist'
require.config({
map: {
'*': {
'underscore': 'js/lodash',
'jquery': 'js/jquery',
'lodash': 'js/lodash'
}
}
});
@steveodom
steveodom / designer.html
Last active August 29, 2015 14:13
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
@steveodom
steveodom / clarify_config
Last active August 29, 2015 14:11
Mashbox: Test of clarify remote config
{
"default_search_terms": ["education"],
"autosearch_terms": [
"three pointer",
"foul shot",
"dunk",
"crossover"
],
"page_title": "Clarify | Sample",
"logo_header": "",
@steveodom
steveodom / README.md
Last active August 29, 2015 14:10 — forked from mbostock/.block

Enclosure diagrams use containment to represent the hierarchy. Although circle packing is not as space-efficient as a treemap, it better reveals the hierarchy. Implementation based on work by Jeff Heer. Data shows the Flare class hierarchy, also courtesy Jeff Heer.

See also this zoomable version.

@steveodom
steveodom / README.md
Last active December 18, 2015 03:49 — forked from mbostock/.block

Click to add nodes! Nodes near the cursor will be linked to the new node.

D3's force layout uses the Barnes–Hut approximation to compute repulsive charge forces between all nodes efficiently. Links are implemented as geometric constraints on top of position Verlet integration, offering greater stability. A virtual spring between each node and the center of the chart prevents nodes from drifting into space.