Skip to content

Instantly share code, notes, and snippets.

View getkey's full-sized avatar
🐧
noot noot

Julien Mourer getkey

🐧
noot noot
View GitHub Profile
@getkey
getkey / har_duplicate_finder.js
Created September 2, 2021 18:01
Small tool to find out if some URL are loaded twice. Takes a HAR file as an entry
const fs = require('fs');
const har = JSON.parse(fs.readFileSync(process.argv[2]));
har.log.entries
.map(({ request }) => request.url)
.reduce((watchlist, url) => {
const seenTimes = watchlist.get(url) || 0;
watchlist.set(url, seenTimes + 1)
@getkey
getkey / unicodify.js
Created August 29, 2021 18:08
Unicodify
function unicodify(str) {
return str.split('')
.map(char => char.charCodeAt(0)
.toString(16)
.toUpperCase()
.padStart(4, '0'))
.map(hex => `\\u${hex}`)
.join('');
}
@getkey
getkey / gradient.glsl
Created February 21, 2019 15:01
Gradient shader
precision mediump float;
varying vec2 vTextureCoord;
varying vec2 aVertexPosition;
uniform sampler2D uSampler;
uniform vec4 startColor;
uniform vec4 endColor;