I use artix linux btw...
Posts tagged #Linux
I use artix linux btw...
To upload random file from current working directory on Linux use a command similar to shown below, also do not forget to quote html as not doing so might cause bugs and this is just an example:
mkdir -p uploaded
FILE=$(find *.* -type f | shuf -n 1); curl -F 'key=<your api key>' -F "media=@$FILE" -F 'content="<p>some html here</p>"' https://loforo.com/api/post/create; mv -v $FILE uploaded
You can copy files you want to upload to a temporary directory by using a command below as example and run above command from there:
for arg in {1..10}; do FILE="$(find -type f|shuf -n 1|cut -d\/ -f2-)"; cp -v --backup=numbered "$FILE" /path/to/tmp/dir/; done Read More »
The image upload example shown below (w/o space added before MyTestPicture so it would not be auto-linked),
curl -d 'key=<your key>' -F 'media=@ MyTestPicture.jpg' -d 'content=<p>A picture is attached to this post</p>' https://loforo.com/api/post/create
also included in api description page does not work, curl fails with messages shown below and no request is sent.
Warning: You can only select one HTTP request method! You asked for both POST
Warning: (-d, --data) and multipart formpost (-F, --form).
Use this instead (change -d to -F where needed, remove space before MyTestPicture, don't forget to quote html): Read More »
Quickly overheats the cpu if not cooled propelry. Can damage cpu fan if worn enough. Otherwise causes an intense run of the cpu fan close to it's maximum. A way to stress test the cpu.
Ubuntu 22.04 LTS is soon to be released so I decided to do a complete reinstall. After booting into Linux Live USB first I've deleted everything from my old install except for the important stuff I needed to keep. Then I've reinstalled the base system using debootstrap and used a script I made to enter the chroot, I installed required packages there to make it boot and to be able to access network. Finally I've installed everything else I needed including graphical interface where a list of installed previously packages would help alot. Such list could be generated by running commands as shown in example below. Read More »