Juozas's Dump

A growing collection of anime, photos and any other kind of weird content.
[Tumblr|​Twitter|​Pillowfort|​Loforo|​Mastodon] [Random post]

 tags  journal  gallery  RSS

22.6.2023 19:00:16

tr -cd '[:print:]' < /dev/urandom | gzip -9 > /dev/null

Generates a huge cpu usage on linux. May generate excessive cpu heat and/or cause fan to run very fast. A great way to stress test the cpu and/or its fan on linux.


reposted by linux raumfahrtagentur
31.3.2023 22:55:38

28.2.2023 21:47:08

Oneline random image html file generator

The command below generates a html file pointing to 100 random image files found in the directory tree of the working directory. You can adjust it to your needs by putting the paths you want to exclude or adding more extensions to placeholders as shown below. The output file shows images centered on screen, with max widths no larger than screen.

echo -e "<html>\n<head>\n<title>Random Images</title>\n</head>\n<style>\nimg {max-width:100%; height:auto}\nbody{text-align:center}\n</style>\n<body>\n$(find -type f -not \( -ipath "./paths/*" -or -ipath "./to/*" -or -ipath "./exclude/*" \) -and \( -iname "*.jpg" -or -iname "*.jpeg" -or -iname "*.png" -or -iname "*.gif" -or -iname "*.webp" -or -iname "*.bmp" \) | cut -d\/ -f2- | sort | shuf -n 100 | tr '\n' '\0' | xargs -0 -I{} echo "<div style=\"margin:auto\"><img title=\"{}\" src=\"$(realpath "{}")\"></div>")</body>\n<html>" > /tmp/random.htm

The output file is saved as /tmp/random.htm


reposted by linux
1.5.2022 20:50:51

A screenshot of a hexdump of first 768 bytes of random data made on linux

12.3.2022 16:36:21

Spam generator

$ for q in $(eval echo {1..$((2+$RANDOM%200))}); do echo $(cat </dev/urandom|tr -cd '[:lower:]'|tr -s '[:print:]'|head -c $((2+$RANDOM%32))); done|xargs

Generates a random amount of random words containing random lowercase letters (up to 200 words and 32 letters per word)


reposted by linux
11.12.2021 11:28:33

Open random page of kyselo right from unix terminal

Run command below in your unix terminal

$ firefox https://kyselo.eu/all?since=$(TZ=Europe/Prague date -d @$(shuf -i $(($(TZ=Europe/Prague date -d '2020-07-13T00:35:49' +"%s")))-$(date +"%s") -n 1) +"%Y-%m-%dT%H%%3A%M%%3A%S")

2020-07-13T00:35:49 is the date of first post in server time, replace 'firefox' with your browser command if you have different browser installed.

Edit: Added correct timezome matching to kyselo to command line, found by examining date of some posts and choosing correct timezone matching the site location.

Edit2: Shortened command a bit by inlining some variables used before.


reposted by linux
1 comments
11.12.2021 23:22:20
works on windows too (in git bash) - I just added start before it
19.10.2021 14:53:26

ffmpeg -f rawvideo -video_size 320x240 -pixel_format bgr8 -framerate 15 -i /dev/urandom -t 1 -q:v 0 out.gif

 

Timeline speed: 0.34 posts per month

 

You have reached the end...

THE END

login