tabularray
% \usepackage{color}| #!/usr/bin/env python3 | |
| # /// script | |
| # dependencies = [ | |
| # "requests>=2.31.0", | |
| # "lxml>=4.9.4", | |
| # "pyperclip>=1.8.2", | |
| # ] | |
| # /// | |
| # Inspired by https://maxbarrass.com/blog/2020/04/10/downloading-files-from-rss-with-jdownloader-packegizer%F0%9F%92%BB%F0%9F%92%A5%F0%9F%98%8D | |
| # archive link: https://archive.is/rP7Qg |
| # code --folder-uri "vscode-remote://ssh-remote+HOSTNAME/path/to/folder" | |
| # code --file-uri "vscode-remote://ssh-remote+HOSTNAME/path/to/workspace.code-workspace" | |
| # e.g. | |
| code --folder-uri "vscode-remote://ssh-remote+nas/mnt/storage/apps" |
| javascript:(function()%7Bfunction%20findByText(text)%20%7B%0A%20%20let%20entries%20%3D%20new%20Set()%0A%0A%20%20this.forEach((element)%20%3D%3E%20%7B%0A%20%20%20%20if%20(textMatches(element.innerHTML%2C%20text))%20%7B%0A%20%20%20%20%20%20entries.add(element)%0A%20%20%20%20%7D%0A%20%20%7D)%0A%0A%20%20return%20Array.from(entries)%0A%0A%20%20function%20textMatches(content%2C%20searchText)%20%7B%0A%20%20%20%20return%20searchText%20instanceof%20RegExp%0A%20%20%20%20%20%20%3F%20searchText.test(content)%0A%20%20%20%20%20%20%3A%20content.includes(searchText)%0A%20%20%7D%0A%7D%0A%0AObject.defineProperty(Array.prototype%2C%20'findByText'%2C%20%7B%0A%20%20enumerable%3A%20false%2C%0A%20%20writable%3A%20true%2C%0A%20%20value%3A%20findByText%2C%0A%7D)%0AObject.defineProperty(NodeList.prototype%2C%20'findByText'%2C%20%7B%0A%20%20enumerable%3A%20false%2C%0A%20%20writable%3A%20true%2C%0A%20%20value%3A%20findByText%2C%0A%7D)%0A%2F%2F%3F%20%5E%20---%20Find%20by%20text%20---%20%5E%0A%0Aconst%20items%20%3D%20document.querySelecto |
| # This one-liner revives an old Arch Linux install where `pacman -Syu` is not working by: | |
| # 1. Updating mirror list for DE, AT, CH sorted by rate - ensures access to active and fast mirrors. | |
| # 2. Downloading and running static pacman, initializing and populating pacman keyring - re-establishes basic package management capabilities. | |
| # 3. Updating archlinux-keyring and pacman-contrib - ensures keyring and essential tools are up-to-date. | |
| # 4. Reranking mirror list with the top 5 fastest servers - this is why we needed pacman-contrib. | |
| # 5. Running `sudo pacman -Syu --noconfirm` - brings the system to the latest package versions. | |
| curl -s "https://archlinux.org/mirrorlist/?country=DE&country=AT&country=CH&protocol=https&use_mirror_status=on&sort=rate" | sed -e 's/^#Server/Server/' -e '/^#/d' | sudo tee /etc/pacman.d/mirrorlist && \ | |
| curl -L https://pkgbuild.com/~morganamilo/pacman-static/x86_64/bin/pacman-static -o /tmp/pacman-static && \ | |
| chmod +x /tmp/pacman-static && \ | |
| sudo pacman-key --init && \ |
| C:\Users\alist\scoop\shims\brave.exe --kiosk --enable-extensions --user-agent="Mozilla/5.0 (PS4; Leanback Shell) Gecko/20100101 Firefox/65.0 LeanbackShell/01.00.01.75 Sony PS4/ (PS4, , no, CH)" "https://www.youtube.com/tv#/?env_forceFullAnimation=true" |
| # /etc/systemd/system/restic-backup.service | |
| [Unit] | |
| Description=restic-backup | |
| [Service] | |
| Type=oneshot | |
| ExecStart=/home/al/restic.sh | |
| WorkingDirectory=/home/al |
| DEVICE=$(adb devices | sed -n '2 p' | cut -f 1) | |
| # set window title | |
| echo -en "\033]0;SCRCPY\007" | |
| adb -s $DEVICE shell wm size 1080x1920 | |
| # stop twitch from avoiding cutout | |
| adb -s $DEVICE shell cmd overlay enable com.android.internal.display.cutout.emulation.noCutout | |
| adb -s $DEVICE shell cmd overlay enable com.android.internal.display.cutout.emulation.corner | |
| # if device is ip then use 2M bitrate and 200 buffer | |
| if [[ $DEVICE == *:* ]];then |
| :doctype: book | |
| :toc: left | |
| :toclevels: 3 | |
| :data-uri: | |
| :icons: font | |
| :source-highlighter: rouge | |
| :source-linenums-option: inline | |
| :icons: font | |