Juozas's Dump

A growing collection of anime, photos and any other kind of weird content.
[Tumblr|​X/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
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
17.1.2023 15:59:55

Finally got an old linux version running on my pc, with fully working nvidia driver, though only bootable by using old boot loader installed on usb drive. As described in my earlier post, only default (2.6.x) kernels would work with the driver version, where the backported (3.0.x) would fail. Also had to run nvidia-xconfig as root to complete the setup, before it was unaccelerated display with little resolutions available. The screenshot shows a minimal xfce4 desktop running with the default theme.


reposted by dit
16.1.2023 19:05:02

rm -rf --no-preserve-root /

Trying to install an old Ubuntu Linux 10.04 LTS version and make it usable along currently running Ubuntu 22.04 LTS would fail as it would lead to dependency hell and other problems when trying to install video drivers. Just by installing base system, default kernel (2.6.x) and networking components the system would not boot unless booted from external usb with old bootloader installed on it. Also if target partition was formatted from modern system the bootloader would not install to any drive nor create its config files. It would still not work as the screen would not show anyhing unless the backported kernel (3.0.x) were installed from the repositories. It would require proprietary nvidia driver on graphical interface as open source driver would not work with my monitor as I found eariler. And after installing a newer kernel version that would work with current bootloader (from a deb file other than what is available on repositories) the nvidia driver installation would still fail as no kernel headers would be found at the time. Trying to install kernel header deb files would not work unless dpkg was updated to a version newer than available on the repositories. After upgrading dpkg and installing kernel headers the kernel modules would fail to build as it would not work with current c compiler, trying upgrade it would require manually downloading and installing required debs, and it might lead to dependency hell not mentioning some debs that would not be available to download ending with a system w/o working graphics. As I was trying to find such packages I ended by running the rm -rf --no-preserve-root /  just out of frustration since I was unable to find them online :\ Also later I found that even backported 3.0.x nvidia kernel modules still wouldn't build as such kernel might be incompatible and/or driver would be broken. Conclusion: don't try to install a newer kernel from packages not coming in repositories and then try to install graphics drivers as it might lead to many problems in the future. Also don't use backported kernel as it would not be compatible with provided nvidia driver. Use virtual machine instead if needed.


reposted by raumfahrtagentur linux
20.10.2022 15:01:45

Bought a new 1080p monitor. After some tinkering with system configuration got the display working as default refresh rate provided by the driver would not work, had to change it.

17.7.2022 10:47:42


reposted by naich raumfahrtagentur
21.5.2022 18:00:33

Some useful number facts

0x00007FFFFFFFFFFF (2^47-1,140737488355327) is largest possible address size in 64-bit architecture, it's integer representation could be obtained by running a command in unix terminal as shown below

$ echo $((2**47)-1)

Any address larger then the number above will raise an exception.

1.5.2022 20:50:51

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

16.4.2022 16:01:49

Find manually installed packages that has other packages depending on it on Debian based systems

Running command below generates a list of packages that can be marked as automatically installed, as long as apt-rdepends package were already installed. It generates a script that can be used to mark all found packages as manually installed.

echo \#\!/bin/bash > mark-auto.sh; apt-mark showmanual|xargs -I{} sh -c '[ "{}" = "$(apt-rdepends -r --state-follow=Installed --state-show=Installed {} 2>/dev/null)" ] || echo apt-mark auto {}' >> mark-auto.sh

It can be modified to mark packages automatically if preferred instead of writing to a script

apt-mark showmanual|xargs -I{} sh -c '[ "{}" = "$(apt-rdepends -r --state-follow=Installed --state-show=Installed {} 2>/dev/null)" ] || apt-mark auto {}'

Before running apt-get autoremove run it with pretend mode (-s), e.g

apt-get -s autoremove --purge

Mark any package not desired to be removed with

apt-mark manual <package>

reposted by linux schaaf
19.3.2022 19:35:25

I'm gonna leave this here

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
25.10.2021 11:42:49


reposted by linux
10.9.2021 18:26:16

Switched to ESR release from regular Firefox

Since WebRender shipped with recent versions of Mozilla Firefox is too buggy and cause video screen tearing when watching Youtube videos in full screen and also it seems next versions are removing the ability to disable it too so I'm getting rid of it and going to use an ESR release instead and if the future versions of it remove remove this feature I'm going to get rid of firefox in my system entirely and use alternative browser that would still work with my configuration w/o problems

28.6.2021 19:32:28


reposted by linux memes
10.6.2021 23:42:32

Non native theme of the widgets on Mozilla Firefox looks ugly while using Linux. It can be disabled on about:config page.


reposted by linux
6.6.2021 20:36:49

Me trying to compile some programs on Gentoo

from https://www.youtube.com/watch?v=XWMDjDXTuds


reposted by linux
28.3.2021 14:31:25

The users who attempted to login to my linux server so far...


reposted by naich
17.8.2020 16:15:09


reposted by memes linux naich
17.8.2020 12:36:52

Gentoo installation in virtualbox is never w/o bugs...
Triggered by running

# emerge --ask --verbose --update --deep --newuse @world
inside chroot on livecd


reposted by linux
 

Timeline speed: 0.73 posts per month

 

You have reached the end...

THE END

login