Skip to content

Instantly share code, notes, and snippets.

@zahachtah
zahachtah / d3-responsive-zoomable-treemap-d3-v4.markdown
Created January 17, 2019 09:53
D3 Responsive Zoomable Treemap (D3 v4+)

D3 Responsive Zoomable Treemap (D3 v4+)

CSS based treemap, D3.js v4 and up

Note: because of % units used for easy CSS responsiveness, treemap tiling can't be modified after window resize (you'd want to re-tile so cells maintain aspect ratio in vertically or horizontally stretched layout). Quite slow – best for smaller datasets.

A Pen by Aleksander Lenart on CodePen.

License.

@zahachtah
zahachtah / vue_tabs.js
Created October 9, 2018 12:06 — forked from tiggreen/vue_tabs.js
Simple Vue.js tab navigation component with Bulma
<template>
<div class="container">
<div class="columns">
<div class="column is-12">
<div class="tabs help-tabs">
<ul>
<li :class="[ lang === 'crontab' ? 'is-active' : '']"><a @click="lang='crontab'">Crontab</a>
</li>
<li :class="[ lang === 'php' ? 'is-active' : '']"><a @click="lang='php'">PHP</a></li>
<li :class="[ lang === 'bash' ? 'is-active' : '']"><a @click="lang='bash'">Bash</a></li>
@zahachtah
zahachtah / .block
Created August 10, 2018 12:02
fresh block
license: mit
@zahachtah
zahachtah / .block
Created August 9, 2018 21:51
Contour Plot
license: gpl-3.0
height: 673
border: no
module Jekyll
class MathJaxBlockTag < Liquid::Tag
def render(context)
'<script type="math/tex; mode=display">'
end
end
class MathJaxInlineTag < Liquid::Tag
def render(context)
'<script type="math/tex">'
end