Skip to content

Instantly share code, notes, and snippets.

View subzey's full-sized avatar

Anton Khlynovskiy subzey

View GitHub Profile
namespace DOMRGBAColor {
/**
* Float64Array of length 4: [R, G, B, A]. Each is normalized to range [0 .. 1]
* [Bikeshed] or Float32Array?
*/
export type FVec4 = Float64Array & { length: 4 };
/**
* Uint8ClampedArray of length 4: [R, G, B, A]
*/
export type IVec4 = Uint8ClampedArray & { length: 4 };
@subzey
subzey / index.html
Created July 17, 2019 13:36
Adding numbers with WebGL2 Transform Feedback
<!doctype html>
<html>
<head>
<title>Adding numbers with WebGL2 Transform Feedback</title>
</head>
<body>
<h1>Adding numbers with WebGL2 Transform Feedback.</h1>
<output></output>
<script src="webgl.js"></script>
<p>View <a href="webgl.js">the commented source</a>!</p>
@subzey
subzey / index.html
Last active July 30, 2025 16:19
Emoji roulette
<!DOCTYPE html>
<html>
<head>
<title>СПГС 2023</title>
<style>
html {
height: 100%;
background: radial-gradient(#fff, #f0f0f0 50%, #aaa) #eee;
}
body {
.ghx-swimlane.ghx-first .ghx-column[data-column-id="554"]:empty {
background: none;
}
.ghx-swimlane.ghx-first .ghx-column[data-column-id="554"]:empty:before {
content: '';
display: block;
position: sticky;
z-index: 2;
top: 100%;
@subzey
subzey / sad.css
Last active April 12, 2019 15:26
sad unicorn bg
@-moz-document url-prefix("https://jira.xtools.tv") {
.ghx-swimlane.ghx-first .ghx-column[data-column-id="554"]:empty {
background-image: url(https://s.tcdn.co/c5f/0a5/c5f0a53d-cec7-36d8-be42-c2e1bf5baf97/13.png);
background-size: contain;
background-position: 50% 20%;
background-repeat: no-repeat;
}
}
@subzey
subzey / index.html
Last active April 8, 2019 19:04
glitchy logo
<!doctype html>
<html>
<head>
<title></title>
<style>
body {
font: 16pt sans-serif;
text-align: center;
}
</style>
@subzey
subzey / filter.svg
Last active February 26, 2020 17:55
SVG retrowave filter
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@subzey
subzey / index.html
Created January 31, 2019 13:29
Resize debug
<!DOCTYPE html>
<html>
<head>
<title>Screen size debug</title>
</head>
<body>
<script>
function log(s){
var logEntry = document.createElement('pre');
logEntry.textContent = (new Date().toISOString() + ' ' + s);
@subzey
subzey / some js
Last active October 5, 2018 08:15
import t from 'some-fancy-templater';
t`
<div class="container">
<h1>Ponies</h1>
<${PonyList}>
${ ponies.map(
({ name, type }) => t`
<${PonyItem} name="${name}" type="{type}"/>
`
@subzey
subzey / main.py
Created August 1, 2018 15:12
Precompressed header
import BaseHTTPServer
import io
import random
import time
import zlib
HOST_NAME = 'localhost'
PORT_NUMBER = 8080
gzip = zlib.compressobj(