diff --git a/bash.org b/bash.org index b03657c..8d01fb3 100644 --- a/bash.org +++ b/bash.org @@ -19,6 +19,12 @@ [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion #+END_SRC +** Miniconda +#+begin_src bash +[ -f /opt/miniconda3/etc/profile.d/conda.sh ] && source /opt/miniconda3/etc/profile.d/conda.sh +#+end_src + + ** FZF #+begin_src bash . /usr/share/fzf/completion.bash diff --git a/binaries.org b/binaries.org index 900c1b9..ae0ed76 100644 --- a/binaries.org +++ b/binaries.org @@ -994,6 +994,27 @@ mp42gif_function() { \ } #+end_src +*** MP4 to GIF Loop +#+begin_src bash +mp42gifloop_function() { \ + if command -v ffmpeg &> /dev/null; then + palette="/tmp/palette.png" + + width=$(echo -e "auto" | rofi -i -dmenu -p "GIF width") + if [ "$width" = "auto" ]; then + filters="fps=15" + else + filters="fps=15,scale=$width:-1:flags=lanczos" + fi + + # # Generate optimal pallette of colors + # ffmpeg -v warning -i "$filename_with_extension" -vf "$filters,palettegen" -y $palette + # Convert + ffmpeg -i "$filename_with_extension" -filter_complex "[0]reverse[r];[0][r]concat=n=2:v=1:a=0,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -y "$filename_without_extension.gif" + fi +} +#+end_src + *** MP4 remove sound #+begin_src bash mp4nosound_function() { \ @@ -1007,7 +1028,7 @@ mp4nosound_function() { \ #+begin_src bash # Convert MP4 Files mp42() { \ - out_ext=$(echo -e "gif\nremove sound" | rofi -i -dmenu -p "Convert MP4 to") + out_ext=$(echo -e "gif\ngif loop\nremove sound" | rofi -i -dmenu -p "Convert MP4 to") if [ -z "$out_ext" ]; then exit; @@ -1017,6 +1038,9 @@ mp42() { \ "gif") mp42gif_function ;; + "gif loop") + mp42gifloop_function + ;; "remove sound") mp4nosound_function ;; @@ -1024,6 +1048,78 @@ mp42() { \ } #+end_src +** AVI files +*** AVI to MP4 +#+begin_src bash +avi2mp4_function() { \ + if command -v ffmpeg &> /dev/null; then + ffmpeg -i "$filename_with_extension" -c:v copy -c:a copy "$filename_without_extension.mp4" + fi +} +#+end_src + +*** AVI to GIF +#+begin_src bash +avi2gif_function() { \ + if command -v ffmpeg &> /dev/null; then + palette="/tmp/palette.png" + mp4tmp="/tmp/avi2gif.mp4" + + width=$(echo -e "auto" | rofi -i -dmenu -p "GIF width") + if [ "$width" = "auto" ]; then + filters="fps=15" + else + filters="fps=15,scale=$width:-1:flags=lanczos" + fi + + ffmpeg -i "$filename_with_extension" -c:v copy -c:a copy -y "$mp4tmp" + + # Generate optimal pallette of colors + ffmpeg -v warning -i "$mp4tmp" -vf "$filters,palettegen" -y $palette + # Convert + ffmpeg -v warning -i "$mp4tmp" -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y "$filename_without_extension.gif" + fi +} +#+end_src + +*** AVI to GIF loop +#+begin_src bash +avi2gifloop_function() { \ + if command -v ffmpeg &> /dev/null; then + palette="/tmp/palette.png" + mp4tmp="/tmp/avi2gif.mp4" + + ffmpeg -i "$filename_with_extension" -c:v copy -c:a copy -y "$mp4tmp" + + ffmpeg -i "$filename_with_extension" -filter_complex "[0]reverse[r];[0][r]concat=n=2:v=1:a=0,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -y "$filename_without_extension.gif" + fi +} +#+end_src + +*** Main function +#+begin_src bash +# Convert AVI Files +avi2() { \ + out_ext=$(echo -e "gif\ngif loop\nmp4" | rofi -i -dmenu -p "Convert AVI to") + + if [ -z "$out_ext" ]; then + exit; + fi + + case "$out_ext" in + "gif") + avi2gif_function + ;; + "gif loop") + avi2gifloop_function + ;; + "mp4") + avi2mp4_function + ;; + esac +} +#+end_src + ** Case statement #+begin_src bash case "$in_ext" in @@ -1039,6 +1135,9 @@ case "$in_ext" in "pdf") pdf2 ;; + "avi") + avi2 + ;; "mp4") mp42 ;; diff --git a/install.org b/install.org index 28e82da..384386d 100644 --- a/install.org +++ b/install.org @@ -950,6 +950,14 @@ paru -S sshfs poppler mpd xwallpaper sof-firmware usbutils xautolock atool unzip paru -S zoom #+end_src +** =colorpicker= ([[https://github.com/Jack12816/colorpicker][github]]) +Copy hexadecimal value of the color to the clipboard: +#+begin_src bash :eval no +colorpicker --short --one-shot --preview | xsel -b +#+end_src + +Also colorbrag: https://aur.archlinux.org/packages/colorgrab + ** =maim=/=flameshot= - Take Screenshots - https://github.com/naelstrof/maim - https://github.com/lupoDharkael/flameshot @@ -1015,6 +1023,11 @@ Web based administration: http://localhost:631/ =system-config-printer= +Starts to cups service: +#+begin_src bash :eval no +sudo systemctl start cups +#+end_src + Check the queue #+begin_src bash lpq @@ -1165,7 +1178,7 @@ sudo systemctl enable --now fstrim.timer Set the fastest mirror for Pacman #+begin_src bash -sudo pacman-mirrors --fasttrack +sudo rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist #+end_src * Configuration for Laptops @@ -1283,8 +1296,7 @@ systemctl --user list-timers | =coreutils= | GNU File, Shell, and Text utilities | | =gnome= | doc-utils - Documentation utilities for the GNOME project | | =moreutils= | Collection of tools that nobody wrote when UNIX was young | - -https://gitlab.com/bztsrc/usbimager +| =usbimager= | https://gitlab.com/bztsrc/usbimager | ** A trier | =asciinema= | Terminal session recorder | diff --git a/router.org b/router.org index 74f48c1..0d16b90 100644 --- a/router.org +++ b/router.org @@ -7,14 +7,20 @@ https://blog.kulakowski.fr/post/openwrt-derriere-une-freebox-ipv6-dmz-et-bridge ** Enable SSL How can I enable SSL for the web admin gui? -In an SSH-command line, run opkg update, then install the package opkg install luci-ssl, then restart the router. Then you can access https://192.168.1.1 or https://openwrt with your favorite web browser +In an SSH-command line, run =opkg update=, then install the package =opkg install luci-ssl=, then restart the router. Then you can access https://192.168.1.1 or https://openwrt with your favorite web browser ** Install useful packages +Not sure all of that is needed. #+begin_src bash -opkg update && opkg install luci-ssl-openssl luci-theme-material ipset curl diffutils speedtest-netperf kmod-ipt-nat6 +opkg update && opkg install luci-ssl-openssl ipset curl diffutils speedtest-netperf kmod-ipt-nat6 #+end_src +Nice theme: +https://github.com/jerrykuku/luci-theme-argon + * Update +This might not be a good idea. + #+begin_src matlab opkg update #+end_src @@ -23,6 +29,181 @@ opkg update opkg list-upgradable | cut -f 1 -d ' ' | xargs -r opkg upgrade #+end_src +** Installed package (before upgrade) +#+begin_quote +ath10k-firmware-qca9984-ct - 2020-07-02-1 +base-files - 204.2-r11306-c4a6851c72 +busybox - 1.30.1-6 +ca-bundle - 20200601-1 +cgi-io - 2021-09-08-98cef9dd-20 +curl - 7.66.0-3 +diffutils - 3.7-2 +dnsmasq - 2.80-16.3 +dropbear - 2019.78-2 +etherwake - 1.09-4 +firewall - 2019-11-22-8174814a-3 +fstools - 2020-05-12-84269037-1 +fwtool - 2 +getrandom - 2019-06-16-4df34a4d-4 +hostapd-common - 2019-08-08-ca8c2bd2-8 +ip6tables - 1.8.3-1 +iperf3 - 3.7-1 +ipset - 7.3-1 +iptables - 1.8.3-1 +iw - 5.0.1-1 +iwinfo - 2019-10-16-07315b6f-1 +jshn - 2020-05-25-66195aee-1 +jsonfilter - 2018-02-04-c7e938d6-1 +kernel - 4.14.221-1-0894164cab0effc42201a29fec8ce33f +kmod-ata-ahci - 4.14.221-1 +kmod-ata-ahci-platform - 4.14.221-1 +kmod-ata-core - 4.14.221-1 +kmod-ath - 4.14.221+4.19.161-1-1 +kmod-ath10k-ct - 4.14.221+2019-09-09-5e8cd86f-1 +kmod-cfg80211 - 4.14.221+4.19.161-1-1 +kmod-gpio-button-hotplug - 4.14.221-3 +kmod-hwmon-core - 4.14.221-1 +kmod-ip6tables - 4.14.221-1 +kmod-ipt-conntrack - 4.14.221-1 +kmod-ipt-core - 4.14.221-1 +kmod-ipt-ipset - 4.14.221-1 +kmod-ipt-nat - 4.14.221-1 +kmod-ipt-nat6 - 4.14.221-1 +kmod-ipt-offload - 4.14.221-1 +kmod-leds-gpio - 4.14.221-1 +kmod-lib-crc-ccitt - 4.14.221-1 +kmod-mac80211 - 4.14.221+4.19.161-1-1 +kmod-nf-conntrack - 4.14.221-1 +kmod-nf-conntrack6 - 4.14.221-1 +kmod-nf-flow - 4.14.221-1 +kmod-nf-ipt - 4.14.221-1 +kmod-nf-ipt6 - 4.14.221-1 +kmod-nf-nat - 4.14.221-1 +kmod-nf-nat6 - 4.14.221-1 +kmod-nf-reject - 4.14.221-1 +kmod-nf-reject6 - 4.14.221-1 +kmod-nfnetlink - 4.14.221-1 +kmod-nls-base - 4.14.221-1 +kmod-ppp - 4.14.221-1 +kmod-pppoe - 4.14.221-1 +kmod-pppox - 4.14.221-1 +kmod-scsi-core - 4.14.221-1 +kmod-slhc - 4.14.221-1 +kmod-usb-core - 4.14.221-1 +kmod-usb-dwc3 - 4.14.221-1 +kmod-usb-dwc3-of-simple - 4.14.221-1 +kmod-usb-ehci - 4.14.221-1 +kmod-usb-ledtrig-usbport - 4.14.221-1 +kmod-usb-ohci - 4.14.221-1 +kmod-usb-phy-qcom-dwc3 - 4.14.221-1 +kmod-usb2 - 4.14.221-1 +kmod-usb3 - 4.14.221-1 +libblobmsg-json - 2020-05-25-66195aee-1 +libc - 1.1.24-2 +libcurl4 - 7.66.0-3 +libgcc1 - 7.5.0-2 +libip4tc2 - 1.8.3-1 +libip6tc2 - 1.8.3-1 +libipset13 - 7.3-1 +libiwinfo-lua - 2019-10-16-07315b6f-1 +libiwinfo20181126 - 2019-10-16-07315b6f-1 +libjson-c2 - 0.12.1-3.1 +libjson-script - 2020-05-25-66195aee-1 +liblua5.1.5 - 5.1.5-3 +liblucihttp-lua - 2019-07-05-a34a17d5-1 +liblucihttp0 - 2019-07-05-a34a17d5-1 +libmbedtls12 - 2.16.12-1 +libmnl0 - 1.0.4-2 +libnl-tiny - 0.1-5 +libopenssl1.1 - 1.1.1n-1 +libpthread - 1.1.24-2 +libubox20191228 - 2020-05-25-66195aee-1 +libubus-lua - 2022-02-21-b32a0e17-1 +libubus20191227 - 2019-12-27-041c9d1c-1 +libubus20210603 - 2022-02-21-b32a0e17-1 +libuci20130104 - 2019-09-01-415f9e48-4 +libuclient20160123 - 2020-06-17-51e16ebf-1 +libustream-mbedtls20150806 - 2020-03-13-40b563b1-1 +libxtables12 - 1.8.3-1 +logd - 2019-06-16-4df34a4d-4 +lua - 5.1.5-3 +luci - git-22.115.68448-712bc8e-1 +luci-app-firewall - git-22.115.68448-712bc8e-1 +luci-app-opkg - git-22.115.68448-712bc8e-1 +luci-base - git-22.115.68448-712bc8e-1 +luci-compat - git-22.115.68448-712bc8e-1 +luci-lib-ip - git-22.115.68448-712bc8e-1 +luci-lib-ipkg - git-22.115.68448-712bc8e-1 +luci-lib-jsonc - git-22.115.68448-712bc8e-1 +luci-lib-nixio - git-22.115.68448-712bc8e-1 +luci-mod-admin-full - git-22.115.68448-712bc8e-1 +luci-mod-network - git-22.115.68448-712bc8e-1 +luci-mod-status - git-22.115.68448-712bc8e-1 +luci-mod-system - git-22.115.68448-712bc8e-1 +luci-proto-ipv6 - git-22.115.68448-712bc8e-1 +luci-proto-ppp - git-22.115.68448-712bc8e-1 +luci-ssl - git-22.115.68448-712bc8e-1 +luci-theme-argon-master - 2.2.9.4 +luci-theme-bootstrap - git-22.115.68448-712bc8e-1 +luci-theme-material - git-22.115.68448-712bc8e-1 +mtd - 24 +netifd - 2021-01-09-753c351b-1 +netperf - 2.7.0-1 +odhcp6c - 2021-01-09-64e1b4e7-16 +odhcpd-ipv6only - 2020-05-03-49e4949c-3 +openwrt-keyring - 2021-02-20-49283916-2 +opkg - 2021-01-31-c5dccea9-1 +perl - 5.28.1-4 +perlbase-base - 5.28.1-4 +perlbase-bytes - 5.28.1-4 +perlbase-class - 5.28.1-4 +perlbase-config - 5.28.1-4 +perlbase-dynaloader - 5.28.1-4 +perlbase-errno - 5.28.1-4 +perlbase-essential - 5.28.1-4 +perlbase-fcntl - 5.28.1-4 +perlbase-filehandle - 5.28.1-4 +perlbase-getopt - 5.28.1-4 +perlbase-io - 5.28.1-4 +perlbase-list - 5.28.1-4 +perlbase-net - 5.28.1-4 +perlbase-posix - 5.28.1-4 +perlbase-scalar - 5.28.1-4 +perlbase-selectsaver - 5.28.1-4 +perlbase-socket - 5.28.1-4 +perlbase-symbol - 5.28.1-4 +perlbase-tie - 5.28.1-4 +perlbase-time - 5.28.1-4 +perlbase-xsloader - 5.28.1-4 +ppp - 2.4.7.git-2019-05-25-3 +ppp-mod-pppoe - 2.4.7.git-2019-05-25-3 +procd - 2020-03-07-09b9bd82-1 +px5g-mbedtls - 9 +rpcd - 2020-05-26-67c8a3fd-1 +rpcd-mod-file - 2020-05-26-67c8a3fd-1 +rpcd-mod-iwinfo - 2020-05-26-67c8a3fd-1 +rpcd-mod-luci - 20201107 +rpcd-mod-rrdns - 20170710 +speedtest-netperf - 1.0.0-1 +swconfig - 12 +ubi-utils - 2.1.1-1 +uboot-envtools - 2018.03-3.1 +ubox - 2019-06-16-4df34a4d-4 +ubus - 2022-02-21-b32a0e17-1 +ubusd - 2022-02-21-b32a0e17-1 +uci - 2019-09-01-415f9e48-4 +uclibcxx - 0.2.5-3 +uclient-fetch - 2020-06-17-51e16ebf-1 +uhttpd - 2020-10-01-3abcc891-1 +umdns - 2020-04-25-cdac0460-1 +urandom-seed - 1.0-1 +urngd - 2020-01-21-c7f7b6b6-1 +usign - 2020-05-23-f1f65026-1 +wakeonlan - 0.41-1 +wireless-regdb - 2021.08.28-1 +wpad-basic - 2019-08-08-ca8c2bd2-8 +#+end_quote + * Configuration ** Configuration Files https://openwrt.org/docs/guide-user/base-system/uci#common_principles @@ -38,9 +219,6 @@ Configuration files are in =/etc/config=. | =/etc/config/system= | Misc. system settings, NTP, RNG, Watchcat | | =/etc/config/wireless= | Wireless settings and wifi network definition | -Nice theme: -https://github.com/jerrykuku/luci-theme-argon - ** VLAN | ID | Name | Description | |----+-----------+-------------| @@ -50,7 +228,7 @@ https://github.com/jerrykuku/luci-theme-argon | 4 | IOT | | | 5 | Unifi-LAN | | -** IP Addresses +** TODO IP Addresses *** LAN | Hostname | MAC-Address | IPv4-Address | Description | |-----------------+-------------------+---------------+-------------| diff --git a/systemd.org b/systemd.org index 828b590..6447e2f 100644 --- a/systemd.org +++ b/systemd.org @@ -408,6 +408,7 @@ restic backup \ --password-command "pass show restic" \ --verbose --one-file-system --tag systemd.timer \ --exclude "/home/thomas/.cache" \ + --exclude "/home/thomas/.local/data/docker" \ --exclude "/home/thomas/Cloud" \ --exclude "/home/thomas/mnt" \ --exclude "/home/thomas/perl5" \