Skip to content

Instantly share code, notes, and snippets.

View kbtz's full-sized avatar


  • Freelance
  • Remote
View GitHub Profile
kbtz / lnx
Last active January 22, 2024 07:18
# A npm link alternative that avoids duplication of shared dependencies.
# It will install a packed version of your local package instead of just soft linking
# the package directory (which would include its own node_modules in dependency resolution).
# Another advantage is that only files that would be published are included in the packed version,
# then these extracted files are replaced with links to their original files.
# Hard links are used since many module resolution and bundling tools might try to resolve
# soft links to their real paths.
kbtz / .block
Created January 21, 2018 23:18 — forked from TennisVisuals/.block
d3v4 reusable updateable global mashup
license: mit
kbtz / .block
Created January 16, 2018 01:11 — forked from mbostock/.block
Brush Snapping II
license: gpl-3.0
kbtz /
Last active October 10, 2017 21:11
Debug webpack config written in TypeScript using ts-node and Chrome Devtools

Just pipe the output of any node process with node-inspector enabled to the inspector function, it will generate a link to connect to the current debugging session...

node --inspect 2>&1 | inspector

You'd better use --inspect-brk instead of --inspect to pause at the first line so you can connect to the inspector first.

To debug my webpack.config.ts I use:

kbtz / GitKraken installer for fedora
Last active September 3, 2017 03:55 — forked from aelkz/[FEDORA] gitkraken
How to install gitkraken on Fedora 25 + launcher icon
if [ ${USER} == "root" ]; then
echo "Don't run the entire script as root;" >&2
exit 1
# Alternative link for icon file
kbtz / ensure-visibility.js
Last active March 14, 2017 02:37
Makes sure a given element is in the visible area of its scroll container;
function ensureVisibility(e, c) {
let e0 = e.offsetTop
let eD = e.clientHeight
let e1 = e0 + eD
let c0 = c.scrollTop
let cD = c.clientHeight
let c1 = c0 + cD
let visible = e0 > c0 && e1 < c1
kbtz / .block
Last active February 19, 2017 01:58 — forked from mbostock/.block
license: gpl-3.0
kbtz / d3.slider.css
Created January 17, 2017 11:34 — forked from cmdoptesc/d3.slider.css
D3: Map Timeline
.d3-slider {
position: relative;
font-family: Verdana,Arial,sans-serif;
font-size: 1.1em;
border: 1px solid #aaaaaa;
z-index: 2;
.d3-slider-horizontal {
height: .8em;