Skip to content

Instantly share code, notes, and snippets.

Avatar
📊

Harrison Shoff hshoff

📊
View GitHub Profile
@hshoff
hshoff / Brush.js
Created Apr 18, 2017
@vx/brush sketch
View Brush.js
import React from 'react';
export default function Brush({ brush }) {
const { start, end, dragging } = brush;
return (
<g className="vx-brush">
{start && dragging &&
<circle
cx={start.x}
cy={start.y}
@hshoff
hshoff / .block
Created Aug 26, 2017
React V16 + D3 + Force
View .block
license: mit
@hshoff
hshoff / .block
Last active Aug 26, 2017
React V16 + D3 + Force
View .block
license: mit
@hshoff
hshoff / .block
Last active Aug 26, 2017
React V16 + D3 + Force
View .block
license: mit
@hshoff
hshoff / .block
Last active Aug 26, 2017
React V16 + D3 + Force
View .block
license: mit
@hshoff
hshoff / .block
Last active Aug 26, 2017
React V16 + D3 + Force
View .block
license: mit
@hshoff
hshoff / .block
Last active Aug 26, 2017
React V16 + D3 + Force
View .block
license: mit
@hshoff
hshoff / .block
Last active Aug 26, 2017
React V16 + D3 + Force
View .block
license: mit
View space.js
import React from 'react';
import cx from 'classnames';
export default function Spacing(Component) {
return (props) => {
const { spaceTop, spaceBottom } = props;
const classes = cx({
[`space-top-${spaceTop}`]: !!spaceTop,
[`space-${spaceBottom}`]: !!spaceBottom,
});
View gist:5032222
SELECT u.country, COUNT(distinct user_id), COUNT(distinct hosting_id), COUNT(*)
FROM users u
JOIN hostings h ON (u.id = h.user_id)
JOIN reservations r ON (u.id = r.host_id)
WHERE h.has_availability = '1' AND r.status = '1' AND r.created_at >= '2011-01-01'
GROUP BY u.country;
You can’t perform that action at this time.