Skip to content

Instantly share code, notes, and snippets.

View subzey's full-sized avatar

Anton Khlynovskiy subzey

View GitHub Profile
@subzey
subzey / frame.html
Created January 24, 2022 14:29
Firefox media
<!doctype html>
<html>
<head>
<style>
body {
background: green;
}
@media (min-width: 1280px) {
body {
background: blue;
@subzey
subzey / index.html
Created February 22, 2022 13:43
dns-prefetch
<!doctype html>
<html>
<head>
<link rel="dns-prefetch" href="https://s3.tradingview.com/">
</head>
<body>
<script>
setTimeout(() => {
const s = document.createElement('script');
s.src = 'https://s3.tradingview.com/tv.js';
<!doctype html>
<canvas id="a" width="500" height="500"></canvas>
<script>
const ctx = document.querySelector('canvas').getContext('2d');
const font = new FontFace('Charting', 'local("SF Pro Display")', {featureSettings: '"tnum" on, "lnum" on'});
document.fonts.add(font);
ctx.font = '42px Charting, sans-serif';
ctx.fillText('11111|', 0, 50);
@subzey
subzey / index.html
Created January 24, 2022 14:52
Translate injections
<!doctype html>
<html>
<head>
<style>
p > :last-child {
color: red;
}
</style>
</head>
<body>
@subzey
subzey / index.html
Created April 13, 2022 14:44
"<symbol> in Promise" leak
<!doctype html>
<script>
let singletonPromise;
function makeSomeRequest() {
if (!singletonPromise) {
singletonPromise = Promise.resolve('(Response from some request that only should be made once)')
}
return singletonPromise;
}
@subzey
subzey / index.html
Last active March 30, 2023 17:05
JsExe like compression with concatenated bootstrap and payload
<!doctype html>
<p>This is a repacked version of <a href="http://www.p01.org/MONOSPACE/">MONOSPACE by Mathieu 'p01' Henri</a>.
<p>Looks like Github Gist have some troubles with storing binary files. Please, <a id="run" target="_blank">Click here</button> to run.
<script>
fetch(`
data:text/html;base64,
iVBORw0KGgoAAAANSUhEUgAABj4AAAACCAAAAADNp/oNAAADyElEQVR4nACgAF//ADxDQU52YXMg
aWQ9Yz48aW1nIG9ubG9hZD1iPWMuZ2V0Q29udGV4dGAyZGA7Zm9yKHQ9bj0nJztlPWIuZ2V0SW1h
@subzey
subzey / index.html
Last active March 30, 2023 17:03
Emoji roulette
<!DOCTYPE html>
<html>
<head>
<title>СПГС 2023</title>
<style>
html {
height: 100%;
background: radial-gradient(#fff, #f0f0f0 50%, #aaa) #eee;
}
body {
@subzey
subzey / index.html
Created February 5, 2018 12:20
Rel noopener
<p><a href="slow.html" target="_blank">Open slow page</a></p>
<canvas id="a"></canvas>
<script>
var a = document.getElementById('a');
var c = a.getContext('2d');
(function frame(){
c.clearRect(0, 0, 300, 150);
c.fillRect(Math.cos(Date.now() / 100) * 125 + 125, 0, 50, 50);
requestAnimationFrame(frame);
})();
@subzey
subzey / index.html
Last active August 25, 2022 09:37
Compositor-only filters
<!doctype html>
<style>
html {
height: 100%;
}
body {
display: flex;
height: 100%;
width: 100%;
margin: 0;
<!doctype html>
<style>
.animated {
animation: rotate 1s linear infinite;
}
@keyframes rotate {
from { transform: rotate(0turn) }
to { transform: rotate(1turn) }
}