Skip to content

Instantly share code, notes, and snippets.

View cornzz's full-sized avatar
📗
Learning

Cornelius cornzz

📗
Learning
View GitHub Profile
@cornzz
cornzz / browse_prntsc.js
Last active March 29, 2022 15:25
Script that lets you browse peoples uploaded screenshots randomly
function randomId() {
let letters = 'abcdefghijklmnopqrstuvwxyz'
return (
'aa'.split('').map(n => letters[Math.floor(Math.random() * 26)]).join('') +
'1111'.split('').map(l => Math.floor(Math.random() * 9)).join('')
)
}
function keydownHandler(e) {
if (e.key === 'ArrowRight') {
@cornzz
cornzz / playbackRate.js
Last active February 16, 2022 14:41
Script which enables YouTube-like control of the video playback rate.
let dTimeout = null
function keydownHandler(e) {
if (e.key !== '>' && e.key !== '<') {
return
}
let video = document.querySelector('video')
if (e.key === '>') video.playbackRate += 0.5
if (e.key === '<' && video.playbackRate > 0) video.playbackRate -= 0.5
@cornzz
cornzz / filter.js
Last active December 9, 2019 15:19
SACNR property filter script
var e = document.querySelector('html body.houses div#page div#content div.section div');
var f = document.createElement('div');
f.setAttribute('style', 'margin: 0px 15px 10px; padding: 5px; border: 0.5px solid black;');
var a = document.createElement('div');
a.setAttribute('id', 'ints');
a.innerHTML = 'Ints: ';
for (var i = 0; i < 14; i++) {
if (i < 13) {
var b = document.createElement('label');
@cornzz
cornzz / nvidia-update-cleaner.ps1
Last active December 26, 2019 00:28
Nvidia post-update cleaning PS script - Run with 'PowerShell.exe -ExecutionPolicy Bypass -File .\nvidia_update_cleaner.ps1'
# PowerShell.exe -ExecutionPolicy Bypass -File .\nvidia-update-cleaner.ps1
Write-Host 'This script is going to clean up old Nvidia installer files.';
Write-Host 'Press any key to continue...';
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');
$paths = ('C:\Program Files\NVIDIA Corporation\Installer2\'), ('C:\ProgramData\NVIDIA Corporation\Downloader\');
$total = 0;
foreach ($path in $paths)
{