Skip to content

Instantly share code, notes, and snippets.

View DanielOberlechner's full-sized avatar

Daniel Oberlechner DanielOberlechner

View GitHub Profile
@DanielOberlechner
DanielOberlechner / webpConverter.sh
Created June 18, 2022 13:54
webp convert all files in current folder with best compression
#!/bin/bash
# -m maximize compression power
# -mt multithreading
# -q quality
# -af optimize with auto filter
# -size enter the wanted compression file size in bytes 250000 are 250 kiloBytes
PARAMS=('-m 6 -q 50 -mt -af -progress')
@DanielOberlechner
DanielOberlechner / index.js
Created May 19, 2022 21:30
Small Javascript Number Counter for Website's
const speed = 10; //Number from 1-? to set the counting speed
const counter = document.querySelector('.js_numberGen'); //query the div or span which shall count
counter.innerHTML += "1";
const updateCount = () => {
const target = parseInt(counter.getAttribute('data-target')); //Set the value to which it should count
const count = parseInt(counter.innerText);
const increment = Math.floor(Math.random() * 10);
if (count < target) {