Juozas's Dump

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

28.2.2023 21:49:42 reposted from juozaspo

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

28.2.2023 18:54:42 reposted from looque

from https://i.redd.it/ofu0r6jfn0ga1.jpg

28.2.2023 18:54:33 reposted from looque

from https://i.redd.it/1w7w9e74gtga1.png

28.2.2023 18:54:23 reposted from looque

from https://i.redd.it/xelcbgkqlkga1.png

28.2.2023 16:56:54 reposted from raumfahrtagentur

"Evening in Beppu" by Kawase Hasui, 1929

28.2.2023 16:55:18 reposted from juozaspo

28.2.2023 16:54:59 reposted from looque

from https://i.redd.it/0akepul3e9ka1.jpg

27.2.2023 21:38:31 reposted from wonko

27.2.2023 19:57:37 reposted from juozaspo

27.2.2023 15:02:14

27.2.2023 14:36:04 reposted from juozaspo

27.2.2023 14:36:02 reposted from juozaspo

27.2.2023 14:32:52 reposted from juozaspo

27.2.2023 14:29:31


reposted by juozaspo
27.2.2023 14:15:16 reposted from juozaspo

27.2.2023 14:15:08 reposted from juozaspo

27.2.2023 14:14:57 reposted from juozaspo

Electrocuted mouse

25.2.2023 14:51:44

25.2.2023 13:37:26

25.2.2023 13:35:51

24.2.2023 20:43:58 reposted from juozaspo

24.2.2023 17:55:18 reposted from desinteressement

24.2.2023 14:41:08 reposted from juozaspo

Zero Width Space

A vere useful where text needs to be wrapped and regular spaces cannot be used. The unicode for it is 0x200B, in linux it can be inserted by typing Ctrl+Shift+U with unicode characher code following right after that

This​is​a​test​paragraph​where​unicode​character​that​is​invisible​space​otherwise​called​zero​width​space​is​used.​It​wraps​around​the​edges​of​the​screen​and​/​or​parent​element​and​is​very​useful​in​other​places​.​Text​just​nicely​wraps​around​such​place​even​if​it​looks​weird​otherwise​.​I​used​it​in​my​blog​settings​so​my​social​links​would​wrap​around​nicely​where​needed.​Unicode​is​a​​very​useful​indeed.

Having a nbsp (0x00A0) in tags also returns weird results in when browsing and/or reading posts. It also can't be copy-pasted. It must be typed manually by using keyboard shortcut and hex code right after that.

24.2.2023 14:27:48

Test

0   1       2           3               4                   5                       6                           7                               8                                   9                                       10

24.2.2023 13:03:14


reposted by dit
24.2.2023 12:10:48

23.2.2023 23:36:21


reposted by kalesor wonko
 
▼ see more... ▼