using the internet 101: RSS readers

A lot of people seem to be unaware of the fact that an RSS reader is probably the most essential program to install on your phone or PC, right next to a web browser and an email client.

An RSS reader allows you to to do a very simple thing: subscribe to any website, news feed or blog and regularly receive all the new articles from those sites. This is how you stay up to date and receive the news that matter and are important to you.

RSS is supported by any modern website: from Mastodon user profiles to Pixelfed photo feeds, Youtube channels, Subreddits and users, blogs as found on Substack, WordPress.org or individual websites, scientific journals, and the list goes on and on. In the past often websites featured RSS logos to signal support for it. But nowadays it has become a core technology and goes without mentioning.

Simply put the URL of the website or user profile into your RSS reader and you are subscribed.

You can then have a quick glance at your RSS reader on the loo and don't have to check any website by hand.

People who do not use RSS readers basically live under a rock.

That's really all there is to it.

about your obligation to boycott Windows 11

Microsoft did a highly unusual move with the new Windows 11: It requires the activation of a piece of hardware in your PC called the "TPM" module (Trusted Platform Module) . This module will turn your PC into a so called "trusted computing" platform. In the past, a lot of PCs (if not almost all of them) shipped with this module disabled, for very good reasons.

You better hold your socks, because this is not some alarmist nonsense, it is quite a big deal. How you decide today about it not only affects your operating system, but also your fundamental basic rights and freedoms and the well-being and integrity of our society.

Why it is there

Many branches of digital industry did not like the idea that people are in principle in full control over the things that happen on their PCs. They wanted to e.g. make a product that charges the user double or triple in a row for the same benefit, such as listening to a song, opening a PDF file or playing a video game. But given that the owner still has actual control over their PC - like a car owner has control over their car who can in principle decide to drive wherever they want - then no software can effectively dictate such things upon you. And even if it tried, then you can just use tools to repair the software and stop it from trying. Because it is your PC and you are ultimately in charge of what it does. Even if the software is trying to pull tricks on you.

This is why the industry wants to establish "trust" into your personal affairs on your PC: they have no trust in how you use their products and whether or not you use them in a manner that they personally deem as desirable and permissible. They want to cripple the abilities and possibilities you naturally have, in order to charge you extra for having it run in a normal manner. This is why the industry needed to implement a hardware mechanism, that guarantees that you no longer have a final say in how your PC functions. You would just take a backseat like in a taxi that used to be your own car, or a backseat in a restaurant that used to be your own kitchen. And after everything was easy and free the first year, suddenly a glass of water will cost $3 instead of $0.03 and you have already been too contracted and entangled into their scheme to move away from it.

This is why the lobby organizations TCPA/TCG were formed at the end of the 90s, that ultimately pushed the TPM 2.0 module into each and every modern PC that exists today. Digital rights organizations such as the EFF have fought the TPM module and warned about it since its inception. Now that the trusted computing infrastructure has been established, Microsoft is making its final move in trying to take you for a fool.

What it does

To put it simply, the TPM grants any piece of software the ability to effectively hide data from the user. The user (who is not to be trusted) cannot make sense of this data and cannot change this data in a meaningful way. This is ensured by special cryptographic processes that run totally isolated inside the TPM module. This also implies that the data cannot be erased without the software ceasing to function entirely, until this exact hidden data is reinstated. In many ways this is comparable to websites being able to store secret cookies on your PC that you cannot ever erase. It might not strike you as such a doomsday scenario at first, you might think that cookies are just a small thing after all.  And they are really useful for a lot of totally harmless features. But you have to consider, that this thought only holds true to how websites function today with regular cookies. Over time websites and governments would team up, adapt to this new power and abuse it for all kinds of purposes. Some of those purposes are highly dangerous and detrimental to all sorts of issues. The exact same is true to the TPM module.

Where it will lead to

20 years ago there was a huge public outrage online, caused by the plans of the TCPA/TCG and later of Microsoft with their "Palladium" platform. Back then, many experts and organizations have warned about the dangers and long-term implications of "trusted computing". In the early 2000 internet, unlike today, Wikipedia did not exist yet and corporate disinformation campaigns were rather limited to conventional methods, like buying research and academic papers, politicians or simply B2B advertising. Ultimately the resistance of major outlets and associations seemed so high online, that the industry did a pull back. Palladium did not happen - yet. Under the disguise of giving you a choice about the TPM, they covertly implemented trusted computing on every modern PC in the shadows. The "innocent" TPM module was planted like a ticking time bomb. Long since then buried, forgotten and grown plenty of grass over, Palladium is now making a comeback. The mandatory TPM module in Windows 11 is Microsoft's silver bullet designed to outpace any public debate or informed choice about it.

Here are some of the negative long-term consequences of trusted computing:

  • it enables universal censorship by corporations and governments and thus cripples free speech (affects: journalists, critics, activists, writers, consumers, ordinary people)
  • it enables infallible, unpreventable and totalitarian forms of tracking, profiling, deanonymizing / personal identification, mass surveillance and spying by corporations and governments
  • software can run in any sort of arbitrary manner, e.g. to milk money, and it can not be changed
  • software within the scheme can execute untrusted malicious code that the user has no control over
  • it can lock users out of their own data intentionally or accidentally
  • it can prevent users from exercising their rights and basic freedoms
  • it enables corporations to engage in anti competitive practice
  • it ultimately enables corporations to entirely shut down free software and digital freedoms

Further reading

"The real problem is that it's possible to make a service or product that you can only access if you have an activated TPM. In the future, if you disable your TPM you may lose the ability to exchange documents or email with your coworkers, buy music online, or do any number of important things that require your computer to communicate with other computers. This will force you to keep your TPM enabled all the time in order to get stuff done. If you have to keep your TPM enabled all the time, then you get all the bad effects of Trusted Computing like government/commercial spying and other people controlling your computer. " ~ Disabling TPM

The solution

It is very easy: never ever activate the TPM module, no matter the cost. If you know people who are ignorant of the problem then send them information material and try to explain it to them. You cannot run Windows 11 without the TPM module, fine. This will eventually change, if enough people boycott it. Windows 11 might even become a failed OS, like Windows Vista did or Windows 8 and the next version will be less erroneous. Also consider that you will probably be able to run Windows 10 for another 8 years. So switching now will only yield disadvantages to you. If you do IT support or provide aid to friends and relatives, you can refuse to help them if their computer has its TPM module activated, and offer to install Windows 10 instead.

But if you ask me personally:  the best course of action is to switch to Linux right away. Pick Ubuntu, it even runs on a substantial variety of phones now. There are local Linux groups that can help you. Free software is about freedom, for yourself and for all of us. We need to care about our environments and the future we set for our children. What political parties and software we elect to have power over our lives and society. The digital realm and the internet are no exception to the rule. It matters just as badly.

Always check that the TPM module is disabled in the BIOS. Never enable it. It is highly dangerous.

If you have already made the wrong choice, there is still time to do the right thing.

remap gamepad controller buttons on Linux

I got this old Chinese "Gasia Co.,Ltd" 054c:0268 PS3 controller. The buttons are all jumbled up and some Windows games don't even allow for remapping them. In order to fix this, you can install the package "xboxdrv", which will emulate an Xbox controller and allows for remapping. Here is the command with the mapping for my controller:

xboxdrv --evdev /dev/input/by-id/usb-Gasia_Co._Ltd_PS_R__Gamepad-event-joystick --evdev-keymap BTN_DPAD_UP=lb --evdev-keymap BTN_DPAD_DOWN=lt --evdev-keymap BTN_DPAD_RIGHT=rb --evdev-keymap BTN_DPAD_LEFT=rt --evdev-keymap BTN_TL2=back --evdev-keymap BTN_TR2=start --evdev-keymap BTN_THUMBR=a --evdev-keymap BTN_THUMBL=b --evdev-keymap BTN_START=x --evdev-keymap BTN_SELECT=y --evdev-keymap BTN_TL=tl --evdev-keymap BTN_TR=tr --evdev-keymap BTN_NORTH=du --evdev-keymap BTN_SOUTH=dd --evdev-keymap BTN_WEST=dl --evdev-keymap BTN_EAST=dr --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2 --axismap -Y1=Y1,-Y2=Y2 --mimic-xpad --trigger-as-button --deadzone 4000 --deadzone-trigger 15% --force-feedback # --silent

You can then use "wine control" to disable the hardware controller in wine.

I used this random post for reference to the Xbox button names (lb is L1, lt is L2, back means select and so forth).

List of Docker caveats / bugs

Build instances don't allow for debugging with interactive console

This is very likely broken by design. Docker wants Dockerfiles to be reproducible and not changed arbitrarily by convenient user input. However nothing could be more crippling to a developer than being unable to directly inspect a broken environment. In many ways building docker containers feels just as frustrating as building and testing live embedded systems. Imagine only how helpful it would be, if docker simply dropped you into a shell once a command failed. Instead you cannot even run the last layer in a new container if using buildx with foreign architectures. At least not without some major shenanigans. And even then most of the really painful and time-consuming issues you run into are actually entirely exclusive to the build environment.

Luckily you can use this workaround via improvised netcat console:

RUN apk add nmap-ncat && ncat 172.17.0.1 8080 -c 'while true; do read i && echo -en "$($i 2>&1)\n # "; done' && false

Buildx instances are not network-isolated from each other

You might tend to believe that build instances behave like docker containers, but that is not really true. If one build instance starts a daemon that is listening on a certain network port, the other instances will not be able to start that same daemon because the port is in use. Since all instances do exactly the same things instructed by the Dockerfile, the first instance will succeed and all successive instances will fail. Although buildx has an --isolation option, it sadly doesn't change the fact as of this writing.

The only workaround is to plug in a script that checks if the port is in use, before the daemon is started:

while(true); do if netstat -putlan | grep MYPORT; then sleep $((1 + $RANDOM % 60)); else break; fi; done

Port publishing mostly broken for greater numbers

Quite often you need to publish more than just one port. Some RFCs and use cases call for more than 40,000 ports to be available (if counting UDP and TCP seperately like Docker does). By default Docker starts a new "userland proxy" process for every port which consumes time to start and memory to run.  Publishing as little as 100 ports will already cause major slowdowns. But even with userland proxy disabled, I ran into the situation that docker would hit internal limits of maybe 512 ports per port range and 1024 ports total. It would then silently, and without warning, stop publishing ports specified higher and after that limit. End of story: Don't use docker to publish ports, if you need to publish more than 512. Use this iptables workaround instead. Always check twice with netstat.

Why XMPP instead of Whatsapp?

  auf Deutsch anzeigen

XMPP is an instant messenger like Whatsapp and it is almost the same to use. However unlike Whatsapp, Signal, Wire and similar XMPP is an open and free standard that is employed in a federation of a great many of servers. You can use it with free "open source" software. Free software is a common good and it is most often produced altruistically, without financial interest, for the better by the community. That's why it's not only free to use, but also why it's free of many bad, malicious and ill influences. Because the source code is open, anyone can check if this is really so, and they can copy and change the program however they like. That means you could for example write a program that archives your chat history on your PC, or send messages to other providers who also use open standards.

To the contrary Facebook could for example decide to reprogram Whatsapp in such a manner, that the end-to-end encryption is bypassed, and that all private messages are copied to market research agencies, secret services, governmental agencies, and other intermediaries in the private sector, where they could potentially be processed and analyzed in any arbitrary manner. In fact the EU has recently decided to make exactly this mandatory. Because Whatsapp is proprietary software, it has been deliberately programmed in such a way that it cannot communicate with other message providers, so that people cannot easily switch away from it. The program acts like a cage in which the user and their content are imprisoned, and in which it's very difficult to think beyond the limited horizon that it offers. It's this way in which virtual environments are created, that almost exclusively serve the purpose of commercial exploitation. And it's always commercial exploitation that's in many aspects again and again in direct conflict with truly good values and goals. That's why e.g. Facebook doesn't facilitate healthy social exchange, but instead only amplifies whatever it is around us that captures people as long as possible to the screen, to view as many ads on their site as they can show to you. Nobody can change this situation, because we are dealing with programs (which websites are also) that have a closed source code. And for the same reason no one can see and control what the program is doing covertly in the background.

Small ambitious providers like Signal, Telegram or Discord share many of the problems that made people want to switch away from Whatsapp in the first place. Even worse: Eventually all small companies will be bought out by the big tech giants, if they become too popular.  From that point on they only change and behave in malicious ways. Additionally, small companies can just as easily be forced by  governments to become and instrument of mass-surveillance and mass-censorship.

Free software, if necessary with peer-to-peer technologies and in a big federation of independent providers, is therefore the only real solution. And not only for instant messaging. You can replace any software in your computer with free software, including the operating system. There is almost no commercial software left nowadays that would be significantly worse or even better than free software. What's left are only a few exceptions more or less in the professional sector, like CAD machines, music production maybe and video cut (unfortunately). But if commercial software had not always been developed in the shadow of being some day outcompeted by free software, commercial providers wouldn't even have programmed it as extensively and with as much functionality as you are used to. Instead they would try to withhold as many features as possible,  try to trick you where they can e.g. by pretending that certain fees or issues arise from real necessities or challenges, just in order to maximize profit with superfluous additional costs. You should therefore always use free software from the beginning and thereby support it.

But why is it then that most people use so little free software? The reasons are sadly for many similar to those that people have if it comes to food and nutrition. It begins with the problem that a lot of people do not even really understand which foods are truly healthy for them and what impact they have. And even if they understand it, then they often judge the food by the picture on the package. Or they buy sweets because it is more seductive than vegetables. Software producers are messing us around by the nose the same way, bait us with marketing and the extra sugar on top of the big dessert. That leads most of us to not switch to things which are actually really good for our digital world and our societies. Instead people are choosing things that just look as comfortable and easy as it can get initially. Where they have to put as little thought into it as possible. That is sad and it shouldn't be that way. Because it shapes the world around us that we create in our digital lives. A world that we live to set others as an example and that we seemingly endorse to them.

I want to live in a world of freedom that respects democratic and human values. That's why I use free software.

 

To get startet with XMPP as easily and best as possible, I highly recommend that you install the client "Conversations" (gratis link, or better yet for $3.99 in Google Play to support the developer). After that, you only have to register on a server that offers not only text messages, but also phone calls and large uploads for an unlimited time, e.g. disroot.org. You can find many many more servers on this list. Anyone can create such a server and users can message each other on the whole XMPP network (not just one server). Do not use conversations.im as suggested by the client, because they will ask for money to continue service after 6 month. You then get an XMPP address, that might look like this: mike@disroot.org.

Docker: interactive shell during build process

Add this to the Dockerfile:

RUN apk add nmap-ncat && ncat 172.17.0.1 8080 -c 'while true; do read i && echo -en "$($i 2>&1)\n # "; done' && false

On your PC:

ncat -lk 8080

Works for Alpine and only if your firewall doesn't block port 8080. Also IP address may differ.

sudo iptables -I INPUT -p tcp -m multiport --dports 8080 -j ACCEPT

Unfortunately you do not get a real terminal, so e.g. vim doesn't work. If you know of any better method, let me know.

howto: multi-architecture builds in Docker

Enable buildx for docker by adding {"experimental": "enabled"} into ~/.docker/config.json:

 if [[  -a ~/.docker/config.json ]]; then echo "\n\nplease add it by hand\!"; else  mkdir ~/.docker/ >& /dev/null; echo '{"experimental": "enabled"}' > ~/.docker/config.json; fi

Install "qemu-user-static"

apt install qemu-user-static

Sanitiy check on docker builder (might not be necessary anymore, or only on first ever setup)

# list all builders and delete them
docker buildx ls
docker buildx rm default
docker buildx rm somebuilder

# sometimes you have to run this several times 
systemctl restart docker
docker run --rm --privileged multiarch/qemu-user-static:register --reset
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

Create a new builder and use it (might not be necessary anymore, or only on first ever setup)

docker buildx create --name mybuilder
docker buildx use mybuilder
docker buildx inspect --bootstrap

Build your images and push them online

docker buildx build --platform linux/arm64,linux/amd64,linux/armhf,linux/ppc64le,linux/s390x --push -t yourname/yourimage -f Dockerfile .

Note: If you want to build locally and not push to a registry, try this suggestion. I tried similar suggestions before and they didn't work. Another method is to set up a private dummy registry to accept the push.

fix "Quickstep has stopped" in Android 9.0 Pie when using recents button with custom launcher

The solution is to uninstall the stock launcher (Quickstep) via command line.

Execute the following from a terminal app on your phone, or from adb shell:

pm uninstall -k --user 0 com.android.launcher3

Now you can use any launcher like Nova Launcher, press the "recents" button (where you can switch between apps and close them) or use the gesture to access it and it will not crash Quickstep.

revert broken Fenix update 20.08.20 Firefox mobile

Update 2023: There are several Firefox clones now that bypass Mozilla's ban on plugins and the browser has been straightened out. I use SmartCookieWeb-Preview and it works very well. Make sure to download "preview" (not regular) and then go to Settings->Advanced->Sideload XPI and copy the URL of the xpi you want to install. This way you can use Violentmonkey and Bypass Paywalls Clean.

To use the old Firefox version (broken on many Big Tech websites now):

  1. Download the last APK version 68.11.0.
  2. Search the app in Google Play and disable auto-updates (three dots).

The update destroyed all your browser and plugin configurations. There is no sane way to get them back. Other than that, your browser will work again.

I am not aware that there is any fork of the old Firefox in the Play Store.

my Notion keybindings

If you haven't tried Notion yet, you should. It is the only tiled and tabbed window manager that truly works well.

The default keyboard shortcuts aren't the best however, and they aren't easy to remember either. I have been using Notion for 15 years now, and I wouldn't know how to do it any better.

  • The mod key is the windows key.
  • F2 opens Urxvt, F3 any command. Middle mouse click the window frame for a menu, or press F12.
  • C closes the window, add shift to kill.
  • Z/X are for switching workspaces "left/right". Add shift and you switch monitors instead.
  • WASD are for frame navigation. Add shift to split the frame in that direction and the cursor is placed in the new frame.
  • Q to tag frame, E to attach the tagged frame.
  • Tab cycles through frame tabs, with shift backwards.
  • R to resize (with arrow keys). Hold shift before to shrink.
  • Return is fullscreen, space is float window, space shift nudge, grave ( ` ) is scratchpad.
  • F10 Go to window, F8 disables Notion keybindings, F1 suspend.

Most things can be done with only the left hand (for normal use) and all vital things even with only the mouse (for watching Youtube on couch while eating). Things are easy to remember as they work akin to known shortcut configurations, like WASD for directional keys, Mod + enter for fullscreen or Mod + tab to cycle tabs. Or if its not clunky they work by abbreviation (C for close, R for resize), or spacial symmetries (Q -> E for tag -> attach sits atop of WASD, Z/X for left/right below WASD).

Files for Download:

keyboard_reference.html (interactive version)

 

useful Linux command shortcuts

Record Audio

RECORD="filename";arecord -v -f cd -t raw | lame -r -b 192 - ${RECORD}.mp3 

Convert Video: Works with Whatsapp and Instagram

VIDEOCONVERT=00:00:00; TOOO=00:00:10; VID=input_video.avi; ffmpeg -i $VID -ss $WHATSAPP `if [[ "$TOOO" =~ [0-9][0-9]:[0-9][0-9]:[0-9][0-9] ]]; then echo "-to $TOOO"; fi` -y -c:v libx264 -pix_fmt yuv420p -preset slow -tune zerolatency -crf 19 -level 3.1 -movflags +faststart -c:a aac -b:a 128k -ar 44100 `echo "$VID" | sed -r "s/\..+$//g"`.out.mp4

Grab screen with sound: There are actually several unresolved ffmpeg bug reports, because using x11grab along with alsa will result in immediate buffer underruns. But some dude on Stackoverflow figured out that you have to use the -rtbufsize and -probesize parameters. Format works for Instagram and Whatsapp. Better use OBS Studio though.

SCREENCAPTURE="out"; GSIZE="1080x1080"; GOFF="0,0"; ffmpeg -rtbufsize 1500M -f alsa -i default -video_size $GSIZE -framerate 30 -rtbufsize 100M -f x11grab -i :0.0+$GOFF -probesize 10M -c:v libx264 -pix_fmt yuv420p -preset ultrafast -tune zerolatency -c:a aac -b:a 256k -ar 44100 ${SCREENCAPTURE}.mp4 -y

Set default apps: This is a total hack. Like you can see, it deletes only the default apps from your preferences and then pumps all files supported by the listed particular applications into it, starting with the most favorable. If you do not do this, then file extensions will be opened by alphabetical order, which is total garbage.

DEFAULT_APPS="org.gnome.FileRoller chromium thunderbird krita_raw org.gnome.Evince gimp gpicview libreoffice-writer libreoffice-base libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-math libreoffice-xsltfilter mpv audacious org.gnome.gedit wine"; if [ -n "$ZSH_VERSION" ]; then setopt shwordsplit; fi; x="${HOME}/.config/mimeapps.list"; y="${HOME}/.local/share/applications/mimeapps.list"; if test -f "$y"; then rm "$y"; ln -s "$x" "$y"; fi; rm /tmp/Awwwk*.txt >& /dev/null; if not grep -q "\[Default Applications\]" "$x"; then echo "[Default Applications]" >> "$x"; fi; awk '/^\[.*\]/{x="/tmp/Awwwk"++i".txt";}{print > x;}' "$x" && { rm "$x"; for i in `seq 16`; do if test -f "/tmp/Awwwk${i}.txt" && grep -q "\[Default Applications\]" /tmp/Awwwk${i}.txt; then rm /tmp/Awwwk${i}.txt; fi; done; for i in `seq 16`; do if test -f "/tmp/Awwwk${i}.txt"; then cat /tmp/Awwwk${i}.txt >> $x; fi; done; echo "[Default Applications]" >> $x; for app in $DEFAULT_APPS; do grep "^MimeType=" /usr/share/applications/${app}.desktop | sed "s/^MimeType=//" | sed "s/;[[:space:]]*$//" | tr ';' '\n' | sed "s/^[[:space:]]*//" | sed "s/$/=${app}.desktop/" >> "$x"; done; echo -e "application/x-dosexec=wine.desktop\napplication/x-msdownload=wine.desktop\naudio/mpeg=mplayer.desktop\naudio/x-mpeg=mplayer.desktop" >> "$x"; echo "done"; }

Github commit: with auto credential insert and submodule update

GIT="."; GPASS="XXXX"; GUSER="ur username"; if ! git remote get-url origin | grep -q "$GPASS"; then git remote set-url origin "$(git remote get-url origin | sed "s#https://\(.\+:.\+@\)*github\.com#https://xx:sdf@github.com#g" |sed "s#^https://[^@]*@*#https://$GUSER:$GPASS@#g")"; fi ; git submodule update --remote --recursive; git add -u; git add * .*; git clean -f; git commit -m "$GIT"; git push

Kill every wine

WINEKILL=; WPIDS=""; for n in $(ps aux | grep "\(:\\\.*\.e[x]e\|"[^[:space:]]*wi[n]e[^[:space:]]*$"\)" |  (cat && echo "$(ps aux | grep "\.exe" | grep defunct)") | (cat && echo "$(ps aux | grep "\.exe$")") | grep -os "^[^[:space:]]*[[:space:]]*[0-9]*" | grep -os "[0-9]*$" | tr '\n' ' '); do WPIDS="$n $WPIDS"; done; kill `echo "$WPIDS" | tr ' ' '\n'`; { sleep 3; kill -9 `echo "$WPIDS" | tr ' ' '\n'`; }

List installed packages by size on Archlinux

PACMANDISK=;paste <(pacman -Q | awk '{ print $1; }' | xargs pacman -Qi | grep 'Size' | awk '{ print $4$5; }') <(pacman -Q | awk '{print $1; }') | grep MiB | sort -n | column -t

List files and directories over 100MB

DU=;du -cshx ./* | grep "^\([0-9][0-9][0-9]M\|[0-9.]*G\)"

Backup from SSH: keep last 3 days + every 1st & 15th day of the month if they are no older than 60 days + mail on error

BACKUPDIR="/mnt/1/BACKUP/TVBOX/"; REMOTEDIR="/storage/srv/"; REMOTESSH="root@192.168.178.15"; BACKUPPREFIX="tvbox_"; KEEPDAYS="(01|15)"; IFNOTOLDERTHAN="60"; KEEPLAST="3"; ERR=-1; OUTFILE="${BACKUPPREFIX}backup_$(date +"%Y-%m-%d").tar.gz"; if cd "$BACKUPDIR"; then ssh "$REMOTESSH" tar czf - "$REMOTEDIR" > "$OUTFILE"; if [ $(/bin/stat -c%s "$OUTFILE") -gt 999999 ]; then while read line; do if [[ ! "$(date -d @$(/bin/stat -c %Y "$line") +%d)" =~ $KEEPDAYS ]]; then rm "$line"; fi; done < <(find . -type f -mtime +$(($KEEPLAST-1)) -name "$BACKUPPREFIX"'backup_*.gz' | sort -u); find . -type f -mtime +$IFNOTOLDERTHAN -name "$BACKUPPREFIX"'backup_*.gz' -delete; else ERR="Receiving data failed."; fi; else ERR="No backup dir."; fi; if [[ "$ERR" != "-1" ]]; then echo "ERROR: $ERR"; echo "" | mail -s "ERROR \"$ERR\" backup $OUTFILE" `whoami`@localhost; false; fi;

Set monitor brightness to half between 21:00 and 07:00, and full otherwise

BRIGHTNESS=1; if [ "$(($(date +%H)))" -gt 20 ] || [ "$(($(date +%H)))" -lt 7 ]; then BRIGHTNESS=0.5; fi; for OU in `xrandr | grep connected | grep -osa "^[^[:space:]]*"`; do xrandr --output $OU --brightness $BRIGHTNESS --gamma 1:1:1 ; done

Using new Laravel 8 Jetstream components

When switching from Laravel 7 to 8, one of the first things I noticed were the <x-jet-... components used for all of the scaffolding. Since there are probably hundreds of options to build forms and to simplify writing plain HTML tags in your templates, I decided to keep it all in one style and use the <x-jet-... for all of my templates.

Like you can read in the Livewire docs, you can pull the components into your project folder like so.

php artisan vendor:publish --tag=jetstream-views

But there is for example no <x-jet-textarea>, so how do you add new components?

Simply edit the file /app/Providers/JetstreamServiceProvider.php and add the following to the end of the boot() function and below:

        $this->registerComponent('textarea');
    } // <- end of boot()

     protected function registerComponent(string $component)
    {
      Blade::component('jetstream::components.'.$component, 'jet-'.$component);
    }

Now you can create and customize the component file in /resources/views/vendor/jetstream/components/textarea.blade.php .

<x-jet-action-message> <x-jet-action-section> <x-jet-application-logo> <x-jet-application-mark> <x-jet-authentication-card-logo> <x-jet-authentication-card> <x-jet-button> <x-jet-confirmation-modal> <x-jet-confirms-password> <x-jet-danger-button> <x-jet-dialog-modal> <x-jet-dropdown-link> <x-jet-dropdown> <x-jet-form-section> <x-jet-input-error> <x-jet-input> <x-jet-label> <x-jet-modal> <x-jet-nav-link> <x-jet-responsive-nav-link> <x-jet-secondary-button> <x-jet-section-border> <x-jet-section-title> <x-jet-switchable-team> <x-jet-textarea> <x-jet-validation-errors> <x-jet-welcome>

 

multi-row tabs in Firefox Quantum

From here you can use this file.

And just put it into your profile directory like this:

~/.mozilla/firefox/horp5zpu.default/chrome/userChrome.css

Don't install the whole git repository, it is just clutter and not worth it. You can change the CSS file to make the tabs more managable. I recommend setting max and min width to 174px and also set "max-height: unset !important;" for "#tabbrowser-tabs".