Skip to content

Instantly share code, notes, and snippets.

View Le0X8's full-sized avatar
🐦
currently working on @acridotheres

Leonard Lesinski Le0X8

🐦
currently working on @acridotheres
View GitHub Profile
@Le0X8
Le0X8 / theme.css
Last active June 14, 2024 21:39
LeetCode stats styling
:root {
--bg-0: #0000; /* Brightest */
--bg-1: #0000;
--bg-2: #0000;
--bg-3: #0000; /* Darkest */
--text-0: #23aeb5; /* Darkest */
--text-1: #23aeb5;
--text-2: #23aeb5;
--text-3: #23aeb5; /* Brightest */
--color-0: #23aeb5; /* "Ring" Color */
@Le0X8
Le0X8 / .zshrc
Last active July 11, 2024 17:01
My .zshrc
commit() { # commit <message>
git stage -A
git commit -m "$*"
git push
}
archive-branch() { # archive-branch <name>
git tag archive/$* $*
git push origin archive/$*
git branch -D $*
@Le0X8
Le0X8 / massconvert.js
Last active January 29, 2024 14:34
Mass converts entire directory of audio files
const fs = require('fs');
const exec = require('child_process').execSync;
const files = fs.readdirSync('.').filter(f => f.endsWith('.wav'));
if (!fs.existsSync('./out')) fs.mkdirSync('./out');
files.forEach(file => exec('ffmpeg -i ' + file + ' -c:a libopus -ac 2 ./out/' + file.replace('.wav', '.webm'), {stdio: 'inherit'}));
console.log('########');
@Le0X8
Le0X8 / bloburlsrc.js
Last active June 15, 2023 13:48
This one-liner shows you an URL in which you can view the source of the page you're visiting
prompt('Copy the the text below and paste it into the adress bar', URL.createObjectURL(new Blob([new TextEncoder().encode(document.documentElement.outerHTML).buffer], { type: 'text/plain' })));
@Le0X8
Le0X8 / bloburl.js
Created June 15, 2023 12:35
This one-liner redirects you to a blob url directly created from the site you are visiting
window.location.href = URL.createObjectURL(new Blob([new TextEncoder().encode(document.documentElement.outerHTML).buffer], { type: 'text/html' }));