Skip to content

Instantly share code, notes, and snippets.

View tzvsi's full-sized avatar
🎯
Focusing

tzvsi tzvsi

🎯
Focusing
  • San Francisco, CA
View GitHub Profile
@tzvsi
tzvsi / .block
Created April 17, 2020 02:09
Brush & Zoom
license: gpl-3.0
redirect: https://observablehq.com/@d3/focus-context
@tzvsi
tzvsi / angle-between-points.js
Created May 25, 2020 15:17 — forked from conorbuck/angle-between-points.js
JavaScript: Find the angle between two points
var p1 = {
x: 20,
y: 20
};
var p2 = {
x: 40,
y: 40
};
@tzvsi
tzvsi / .gitignore
Created June 13, 2020 03:27 — forked from susielu/.gitignore
d3-annotation: Responsive Types and Hover
.DS_Store
@tzvsi
tzvsi / README.md
Created June 13, 2020 03:28 — forked from biovisualize/README.md
direct svg to canvas to png conversion

It seems that Chrome finally found a way to let us convert from svg to canvas to png without the tainted canvas security feature/bug.

@tzvsi
tzvsi / index.html
Created June 13, 2020 03:28 — forked from tmcw/index.html
d3.keybinding
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font:12px/20px 'Helvetica';
}
textarea, input {
width:100%;
height:20px;
margin:0;
@tzvsi
tzvsi / guid.py
Created August 7, 2020 17:51
Create a Deterministic / Reproducible GUID (RFC 4122) from String
import hashlib
import uuid
seed = 'foo'
m = hashlib.md5()
m.update(seed.encode('utf-8'))
new_uuid = uuid.UUID(m.hexdigest())
print(new_uuid)