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 / 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 / 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 / .gitignore
Created June 13, 2020 03:27 — forked from susielu/.gitignore
d3-annotation: Responsive Types and Hover
.DS_Store
@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 / jq-cheetsheet.md
Created November 17, 2017 05:18 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@tzvsi
tzvsi / curl-websocket.sh
Created September 30, 2017 03:10 — forked from htp/curl-websocket.sh
Test a WebSocket using curl.
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/