Skip to content

Instantly share code, notes, and snippets.

View subzey's full-sized avatar

Anton Khlynovskiy subzey

View GitHub Profile
@subzey
subzey / index.html
Created November 18, 2019 14:56
webgl2 shaders example
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<canvas id="a"></canvas>
<script>
const gl = a.getContext('webgl2');
const program = gl.createProgram();
@subzey
subzey / index.html
Created November 13, 2019 13:43
iframe autoplay
<!doctype html>
<html>
<head>
<title></title>
</head>
<body>
<script>
function playSound() {
var ifr = document.createElement('iframe');
ifr.allow = 'autoplay';
@subzey
subzey / index.html
Last active October 30, 2019 16:47
Outside setTimeout
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<button>Click me</button>
<script>
function addOutsideEventListener(outsideContainer, handler, ownerDocument, events) {
function handleOutsideEvent(e) {
<!doctype html>
@subzey
subzey / index.html
Created October 17, 2019 10:15
stroke vs fill lines
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<canvas id="a" width="800" height="600"></canvas>
<p>
<label><input type="checkbox" id="strokes"> Draw with strokes </label>
</p>
@subzey
subzey / index.html
Created October 17, 2019 09:41
fills vs. strokes
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<canvas id="a" width="800" height="600"></canvas>
<p>
<label><input type="checkbox" id="strokes"> Draw with strokes </label>
</p>
https://docs.google.com/presentation/d/1BCIKJExmTMjggKxz-Qqn0Pvw7cC7CqsgObj8IKpvDBo/edit?usp=drivesdk
}.\70-\63\68\61\6E\6E\65\6C_\73\69\64\65\62\61\72__\73\74\61\74\69\63_\6C\69\73\74::AFTER{CONTENT:'';DISPLAY:BLOCK;PADDING:95% 0 0;BACKGROUND:URL(HTTPS://TELEGRAMCHANNELS.ME/\73\74\6F\72\61\67\65/\73\74\69\63\6B\65\72\73/\62\6F\72\6E\74\6F\62\65\61\75\6E\69\63\6F\72\6E/\62\69\67_\62\6F\72\6E\74\6F\62\65\61\75\6E\69\63\6F\72\6E_11.\70\6E\67)0 0;BACKGROUND-SIZE:COVER
@subzey
subzey / srv.js
Created August 2, 2019 09:33
separated stles demo
const port = 8080;
require('http')
.createServer((req, res) => {
switch (req.url) {
case '/':
res.writeHead(200, { 'Content-Type': 'text/html;charset=utf-8' });
res.end(`
<!doctype html>
<html>
@subzey
subzey / tar-gz-test.sh
Created July 31, 2019 13:05
tar.gz with indentical file test
#!/bin/sh
for size in 10K 20K 30K 31K 32K 40K 50K
do
echo "Two identical files of ${size}"
head -c ${size} /dev/urandom > file1.bin
cp file1.bin file2.bin
tar -czf test.tar file1.bin file2.bin
wc -c test.tar
done