onny:notizen
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| onny:notizen [2023/05/10 08:40] – [ip] 10.200.0.1 | onny:notizen [2026/09/17 13:08] (current) – [kernel] 10.250.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== kernel ===== | ||
| - | |||
| - | grep kernel config running system | ||
| - | <code bahs> | ||
| - | zcat / | ||
| - | </ | ||
| - | |||
| - | ===== fish ===== | ||
| - | |||
| - | unset history | ||
| - | < | ||
| - | fish --private | ||
| - | </ | ||
| - | |||
| ===== bash ===== | ===== bash ===== | ||
| Line 101: | Line 87: | ||
| chmod +x $FILE | chmod +x $FILE | ||
| $FILE " | $FILE " | ||
| - | </ | ||
| - | ==== sed ==== | ||
| - | Mit sed inplace eine Zeile zu einer Datei hinzufügen: | ||
| - | <code bash> | ||
| - | sed -i ' | ||
| - | </ | ||
| - | add to end of file | ||
| - | <code bash> | ||
| - | sed -i -e ' | ||
| - | </ | ||
| - | Comment out specific line matching a string | ||
| - | <code bash> | ||
| - | sudo sed -e '/ | ||
| - | </ | ||
| - | comment out multiple lines / range | ||
| - | <code bash> | ||
| - | sed -i "28,33 s/# *//" autogen.sh | ||
| - | </ | ||
| - | regex parse value of xml tags | ||
| - | <code bash> | ||
| - | sed -n ' | ||
| - | </ | ||
| - | delete multiple lines | ||
| - | <code bash> | ||
| - | sed -i ' | ||
| </ | </ | ||
| - | insert line after match | ||
| - | <code bash> | ||
| - | sed '/ | ||
| - | </ | ||
| ==== grep ==== | ==== grep ==== | ||
| regex match group | regex match group | ||
| Line 138: | Line 95: | ||
| </ | </ | ||
| - | ==== fd ==== | ||
| - | search for all files with specific extension in directory / | ||
| - | <code bash> | ||
| - | fd --type f -e fm . / | ||
| - | </ | ||
| - | |||
| - | zip all files with specific file extension | ||
| - | <code bash> | ||
| - | fd -t f -e fm . / | zip source -@ | ||
| - | </ | ||
| - | |||
| - | file creation timespan | ||
| - | <code bash> | ||
| - | fd --type f -e pdf --change-newer-than " | ||
| - | </ | ||
| - | |||
| - | execute command | ||
| - | <code bash> | ||
| - | fd --type f -e doc -e docx -e pdf -i gabriel -x cp --backup=t {} / | ||
| - | </ | ||
| - | |||
| - | find filenames unallowed characters | ||
| - | <code bash> | ||
| - | fd '[^A-Z a-züö@0-9._-]' | ||
| - | </ | ||
| - | |||
| - | ==== curl ==== | ||
| - | post data | ||
| - | <code bash> | ||
| - | curl --data " | ||
| - | </ | ||
| - | download and extract archive | ||
| - | <code bash> | ||
| - | curl http:// | ||
| - | </ | ||
| - | set host header | ||
| - | <code bash> | ||
| - | torify curl --header "Host: http.pi" | ||
| - | </ | ||
| ==== patching ==== | ==== patching ==== | ||
| Line 197: | Line 115: | ||
| < | < | ||
| fd . | xargs -I {} rm " | fd . | xargs -I {} rm " | ||
| + | </ | ||
| + | ===== date ===== | ||
| + | |||
| + | convert date to unix timestamp | ||
| + | |||
| + | <code bash> | ||
| + | date -d " | ||
| + | </ | ||
| + | |||
| + | convert unix timestamp to datetime | ||
| + | |||
| + | <code bash> | ||
| + | date -d @1254330900 ' | ||
| </ | </ | ||
| ===== rsync ===== | ===== rsync ===== | ||
| Line 222: | Line 153: | ||
| </ | </ | ||
| ===== networking ===== | ===== networking ===== | ||
| + | ==== ip ==== | ||
| + | |||
| + | set new address | ||
| + | |||
| + | <code bash> | ||
| + | ip addr flush dev enp7s0f4u2 | ||
| + | ip addr add 10.42.0.2/ | ||
| + | ip link set enp7s0f4u2 up | ||
| + | </ | ||
| + | |||
| + | add route | ||
| + | |||
| + | <code bash> | ||
| + | ip route add default via 10.42.0.1 dev usb0 | ||
| + | </ | ||
| ==== nftables ==== | ==== nftables ==== | ||
| + | |||
| <code bash> | <code bash> | ||
| nft list ruleset | nft list ruleset | ||
| Line 228: | Line 175: | ||
| nft -f ruleset.nft | nft -f ruleset.nft | ||
| </ | </ | ||
| + | |||
| display handles, insert rule at position | display handles, insert rule at position | ||
| + | |||
| <code bash> | <code bash> | ||
| nft -a list ruleset | nft -a list ruleset | ||
| Line 347: | Line 296: | ||
| Constant quality AV1. The CRF value can be from 0–63. Lower values mean better quality. | Constant quality AV1. The CRF value can be from 0–63. Lower values mean better quality. | ||
| <code bash> | <code bash> | ||
| - | ffmpeg -i input.mp4 -c:v libaom-av1 | + | ffmpeg -i input.mov -c:v libsvtav1 |
| </ | </ | ||
| Burn subtitles, fast video conversion | Burn subtitles, fast video conversion | ||
| Line 353: | Line 302: | ||
| ffmpeg -i Kawamata\ -\ La\ passage\ des\ chaises.mkv -vf subtitles=Kawamata\ -\ La\ passage\ des\ chaises.mkv -acodec copy -preset:v ultrafast Kawamata\ -\ La\ passage\ des\ chaises.mp4 | ffmpeg -i Kawamata\ -\ La\ passage\ des\ chaises.mkv -vf subtitles=Kawamata\ -\ La\ passage\ des\ chaises.mkv -acodec copy -preset:v ultrafast Kawamata\ -\ La\ passage\ des\ chaises.mp4 | ||
| </ | </ | ||
| - | ==== batch convert images ==== | + | |
| - | <code bash> | + | |
| - | for i in *.jpeg; convert -resize 30% $i (string replace jpeg jpg $i); end | + | |
| - | </ | + | |
| ==== lossless mp3 merge ==== | ==== lossless mp3 merge ==== | ||
| <code bash> | <code bash> | ||
| Line 373: | Line 319: | ||
| </ | </ | ||
| ===== security ===== | ===== security ===== | ||
| + | |||
| + | ==== age ==== | ||
| + | |||
| + | encrypt secret | ||
| + | < | ||
| + | echo -n " | ||
| + | age -e -r " | ||
| + | </ | ||
| ==== web discovery ==== | ==== web discovery ==== | ||
| Line 434: | Line 388: | ||
| chromium --ignore-gpu-blacklist | chromium --ignore-gpu-blacklist | ||
| </ | </ | ||
| - | ===== docker | + | ===== vscodium |
| - | Pull | + | shortcut toggle block comment |
| <code bash> | <code bash> | ||
| - | docker pull ubuntu: | + | Ctrl + Shift + A |
| - | docker pull rootlogin/ | + | |
| </ | </ | ||
| - | Run | + | add and jump to bookmark (requires extension) |
| <code bash> | <code bash> | ||
| - | docker run -td ubuntu: | + | Ctrl + Alt + K |
| + | Ctrl + Alt + J | ||
| </ | </ | ||
| - | |||
| - | Executing | ||
| - | <code bash> | ||
| - | docker exec -it ffffdfdfsdfsdfsfsffsdfs /bin/bash | ||
| - | </ | ||
| - | |||
| - | Nextcloud | ||
| - | <code bash> | ||
| - | docker run -d -p 80:80 rootlogin/ | ||
| - | docker run -v / | ||
| - | </ | ||
| - | |||
| - | Debugging it | ||
| - | <code bash> | ||
| - | | ||
| - | | ||
| - | </ | ||
| - | |||
| - | Pull from repository | ||
| - | < | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | # docker stop / run | ||
| - | | ||
| - | | ||
| - | </ | ||
| - | |||
| - | Build from Dockerfile | ||
| - | < | ||
| - | | ||
| - | sudo docker build -t=" | ||
| - | sudo docker run -p 80:80 -d docker-invoiceplane-nginx | ||
| - | </ | ||
| - | Build from URL | ||
| - | <code bash> | ||
| - | docker build -t nextcloud-testing github.com/ | ||
| - | </ | ||
| - | Delete image | ||
| - | <code bash> | ||
| - | docker rmi <image name / id> | ||
| - | </ | ||
| - | Export and load image | ||
| - | <code bash> | ||
| - | docker save myimage > myimage.tar | ||
| - | docker load < myimage.tar | ||
| - | </ | ||
| - | Remove all images and containers | ||
| - | < | ||
| - | docker system prune -a | ||
| - | </ | ||
| - | docker stop all container | ||
| - | <code bash> | ||
| - | docker stop (docker ps -a -q) | ||
| - | </ | ||
| - | prevent from auto start | ||
| - | <code bash> | ||
| - | docker update --restart=no client-iaro_db_1 | ||
| - | </ | ||
| - | docker commit container and rerun | ||
| - | <code bash> | ||
| - | $ docker ps -a | ||
| - | CONTAINER ID IMAGE | ||
| - | 5a8f89adeead | ||
| - | $ docker commit 5a8f89adeead newimagename | ||
| - | $ docker run -ti -v " | ||
| - | </ | ||
| - | |||
| - | Run emulated multiarch images | ||
| - | <code bash> | ||
| - | docker run --rm --privileged multiarch/ | ||
| - | docker run --rm -t arm32v7/ | ||
| - | docker run -it --rm arm32v7/ | ||
| - | # keep it running | ||
| - | docker run -d -it --name alpine-armv7 --platform linux/ | ||
| - | </ | ||
| - | |||
| - | ==== wordpress docker image ==== | ||
| - | <file yml docker-compose.yml> | ||
| - | version: ' | ||
| - | |||
| - | services: | ||
| - | db: | ||
| - | | ||
| - | | ||
| - | - db_data:/ | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | |||
| - | | ||
| - | | ||
| - | - db | ||
| - | | ||
| - | | ||
| - | - .:/ | ||
| - | | ||
| - | - " | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | volumes: | ||
| - | db_data: | ||
| - | </ | ||
| - | Note the mount instruction in the volumes section, providing the local theme to the wordpress container. | ||
| - | <code bash> | ||
| - | docker-compose up -d | ||
| - | </ | ||
| - | Visit 127.0.0.1: | ||
| - | |||
| ===== eigenes system setup ===== | ===== eigenes system setup ===== | ||
| ==== signatures ==== | ==== signatures ==== | ||
| Line 568: | Line 406: | ||
| </ | </ | ||
| - | ===== ansible ===== | + | |
| - | Run single command | + | |
| - | <code bash> | + | |
| - | ansible playground.pi -i hosts -m shell -a " | + | |
| - | </ | + | |
| - | Limit playbook to specific host from group | + | |
| - | <code bash> | + | |
| - | ansible-playbook -i hosts archlinux-syssetup.yml -l playground.pi --ask-become-pass | + | |
| - | </ | + | |
| - | Running single ansible role | + | |
| - | <file - picloud.yml> | + | |
| - | roles: | + | |
| - | - { role: nsupdate, tags: nsupdate } | + | |
| - | </ | + | |
| - | <code bash> | + | |
| - | | + | |
| - | </ | + | |
| - | Directly define server without inventory file | + | |
| - | <code bash> | + | |
| - | ansible-playbook -i " | + | |
| - | </ | + | |
| - | Skip specific role by tag | + | |
| - | <code bash> | + | |
| - | ansible-playbook --inventory-file=.vagrant/ | + | |
| - | </ | + | |
| - | ==== playbook ==== | + | |
| - | Include distribution specific vars, e.g. '' | + | |
| - | <file - tasks/ | + | |
| - | - name: Include OS-specific variables. | + | |
| - | include_vars: | + | |
| - | </ | + | |
| - | use encrypted vars with vault | + | |
| - | <code bash> | + | |
| - | ansible-vault encrypt_string --vault-password-file ~/ | + | |
| - | </ | + | |
| - | <file - vars/ | + | |
| - | notsecret: myvalue | + | |
| - | mysecret: !vault | | + | |
| - | $ANSIBLE_VAULT; | + | |
| - | 66386439653236336462626566653063336164663966303231363934653561363964363833313662 | + | |
| - | 6431626536303530376336343832656537303632313433360a626438346336353331386135323734 | + | |
| - | 62656361653630373231613662633962316233633936396165386439616533353965373339616234 | + | |
| - | 3430613539666330390a313736323265656432366236633330313963326365653937323833366536 | + | |
| - | 34623731376664623134383463316265643436343438623266623965636363326136 | + | |
| - | other_plain_text: | + | |
| - | </ | + | |
| - | <code bash> | + | |
| - | ansible-playbook -i hosts -v piradio.yml --ask-become-pass --vault-password-file ~/ | + | |
| - | </ | + | |
| - | conditions | + | |
| - | <code yml> | + | |
| - | - name: Enable ufw service | + | |
| - | service: | + | |
| - | name: ufw | + | |
| - | enabled: yes | + | |
| - | when: ufw_state == " | + | |
| - | </ | + | |
| ===== podcasts ===== | ===== podcasts ===== | ||
| Line 670: | Line 452: | ||
| </ | </ | ||
| ==== git ==== | ==== git ==== | ||
| + | |||
| + | git fetch remote branch of a pull request | ||
| + | < | ||
| + | git fetch upstream pull/ | ||
| + | git checkout pr-518799 | ||
| + | </ | ||
| + | |||
| + | git show, list only affected files | ||
| + | <code bash> | ||
| + | git show 45d2d903d507e8c8ce0c766243af103baa1bbe24 --name-only | ||
| + | </ | ||
| + | |||
| + | unstage changes to a specific file of a specific commit | ||
| + | <code bash> | ||
| + | git rebase -i 19d0900f23e0b29fc2706dbbf8a806cea7c3e0f2^ | ||
| + | git restore --staged --source=HEAD^ -- pkgs/ | ||
| + | git restore -- pkgs/ | ||
| + | git commit --amend | ||
| + | git rebase --continue | ||
| + | </ | ||
| + | |||
| + | git rebase --onto, change base of current branch to one commit before 2c1231... but keep every commits after 52d639995... | ||
| + | |||
| + | <code bash> | ||
| + | git rebase --onto 2c1231d61dad184b6ebcff43bb5487a2cdfcc760~1 52d639995ffe58e3dc9de3c9d4193c2188133793 | ||
| + | </ | ||
| + | |||
| + | merge changes into last commit | ||
| + | <code bash> | ||
| + | git commit -a --amend --no-edit | ||
| + | </ | ||
| + | |||
| show remote origin | show remote origin | ||
| <code bash> | <code bash> | ||
| git remote show origin | git remote show origin | ||
| </ | </ | ||
| + | |||
| change remote origin | change remote origin | ||
| <code bash> | <code bash> | ||
| git remote set-url origin gitlab@http-new.pi: | git remote set-url origin gitlab@http-new.pi: | ||
| </ | </ | ||
| - | tagging | + | |
| - | <code bash> | + | |
| - | git tag -a v0.1 -m ' | + | |
| - | </ | + | |
| merge commits from a remote repository | merge commits from a remote repository | ||
| + | |||
| <code bash> | <code bash> | ||
| git fetch https:// | git fetch https:// | ||
| Line 758: | Line 571: | ||
| git rebase upstream/ | git rebase upstream/ | ||
| </ | </ | ||
| + | |||
| squash commits | squash commits | ||
| + | |||
| <code bash> | <code bash> | ||
| git rebase -i upstream/ | git rebase -i upstream/ | ||
| # < choose squash for all of your commits, except the first one > | # < choose squash for all of your commits, except the first one > | ||
| # < Edit the commit message to make sense, and describe all your changes > | # < Edit the commit message to make sense, and describe all your changes > | ||
| - | git push origin omgpull -f | + | # or |
| - | </ | + | |
| - | alternatively | + | |
| - | <code bash> | + | |
| git rebase -i HEAD~3 | git rebase -i HEAD~3 | ||
| - | </ | + | # or (replace main with origin branch) |
| - | alternatively | + | git rebase -i $(git merge-base HEAD main) |
| - | <code bash> | + | # or |
| git merge --squash apple-a9 | git merge --squash apple-a9 | ||
| </ | </ | ||
| + | |||
| rerun tests with empty commit | rerun tests with empty commit | ||
| <code bash> | <code bash> | ||
| git commit --allow-empty -m 'run tests again' | git commit --allow-empty -m 'run tests again' | ||
| git push --set-upstream USERNAME mynewbranch | git push --set-upstream USERNAME mynewbranch | ||
| - | </ | ||
| - | change message of last git commit | ||
| - | <code bash> | ||
| - | git commit --amend | ||
| </ | </ | ||
| force push, remove latest commit of remote repository (origin) | force push, remove latest commit of remote repository (origin) | ||
| Line 807: | Line 616: | ||
| git commit --all --amend --no-edit | git commit --all --amend --no-edit | ||
| git rebase --continue | git rebase --continue | ||
| - | </ | ||
| - | |||
| - | add co-author / co-authors to commit | ||
| - | <code bash> | ||
| - | git commit --amend | ||
| - | # Add line: Co-authored-by: | ||
| </ | </ | ||
| ===== yum ===== | ===== yum ===== | ||
| Line 848: | Line 651: | ||
| nmap -p 80 192.168.188.0/ | nmap -p 80 192.168.188.0/ | ||
| </ | </ | ||
| - | ===== debian ===== | + | |
| - | which package provides file XY | + | |
| - | <code bash> | + | |
| - | apt-file update | + | |
| - | apt-file search netstat | + | |
| - | </ | + | |
| - | extract deb package | + | |
| - | <code bash> | + | |
| - | ar x *.deb | + | |
| - | </ | + | |
| ===== Makefile ===== | ===== Makefile ===== | ||
| define variables with preset which can be overwritten | define variables with preset which can be overwritten | ||
| Line 889: | Line 683: | ||
| </ | </ | ||
| ===== mail ===== | ===== mail ===== | ||
| + | |||
| + | test imap login | ||
| + | < | ||
| + | openssl s_client -connect mx1.project-insanity.org: | ||
| + | # a1 LOGIN < | ||
| + | # a2 LOGOUT | ||
| + | </ | ||
| + | |||
| echo mail server | echo mail server | ||
| < | < | ||
| Line 894: | Line 696: | ||
| </ | </ | ||
| * check spamminess of email server: https:// | * check spamminess of email server: https:// | ||
| - | * manual imap login | + | |
| - | openssl imaps login | + | |
| - | < | + | |
| - | openssl s_client -connect mail.sexypump.de: | + | |
| - | A login cypherpunk cypherpunk | + | |
| - | </ | + | |
| - | get quota | + | |
| - | < | + | |
| - | a GETQUOTAROOT INBOX | + | |
| - | </ | + | |
| - | get msg count of folder | + | |
| - | < | + | |
| - | a LIST INBOX * | + | |
| - | * LIST (\HasChildren) " | + | |
| - | * LIST (\HasNoChildren \UnMarked) " | + | |
| - | * LIST (\HasNoChildren \UnMarked) " | + | |
| - | * LIST (\HasNoChildren \UnMarked \Trash) " | + | |
| - | * LIST (\HasNoChildren \UnMarked \Sent) " | + | |
| - | * LIST (\HasNoChildren \UnMarked) " | + | |
| - | * LIST (\HasNoChildren \UnMarked \Junk) " | + | |
| - | * LIST (\HasNoChildren \UnMarked \Drafts) " | + | |
| - | * LIST (\HasNoChildren \UnMarked) " | + | |
| - | a OK List completed (0.001 + 0.000 secs). | + | |
| - | a SELECT INBOX | + | |
| - | </ | + | |
| send smtp mail | send smtp mail | ||
| < | < | ||
| Line 934: | Line 712: | ||
| DONE | DONE | ||
| </ | </ | ||
| - | ===== Android ===== | + | |
| - | installed apps | + | |
| - | < | + | |
| - | antennapod davx5 dbnavigator fdroid fennec icsx5 jellyfin keepassdx libreoffice vlc nextcloud quicklyric radiodroid signal soundhound spotify tasks documentviewer fdroid-privilegedextension | + | |
| - | </ | + | |
| - | configurations | + | |
| - | * antennpod subscriptions | + | |
| - | * fdroid pi repo | + | |
| - | * davx calendar & contacts | + | |
| - | * jellyfin config | + | |
| - | * nextcloud config | + | |
| - | * signal backup | + | |
| - | * radiodroid station list | + | |
| - | * spotify config | + | |
| - | flash recovery | + | |
| - | <code bash> | + | |
| - | heimdall flash --RECOVERY twrp-3.2.1-1-serranoltexx.img | + | |
| - | </ | + | |
| - | anbox | + | |
| - | <code bash> | + | |
| - | pacman -S anbox-git anbox-image anbox-modules-dkms-git | + | |
| - | modprobe binder_linux ashmem_linux | + | |
| - | systemctl restart anbox-container-manager | + | |
| - | systemctl --user restart anbox-session-manager | + | |
| - | anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity | + | |
| - | wget " | + | |
| - | adb install FDroid.apk | + | |
| - | </ | + | |
| ====== davdroid ====== | ====== davdroid ====== | ||
| < | < | ||
| Line 1062: | Line 813: | ||
| </ | </ | ||
| ===== systemd ===== | ===== systemd ===== | ||
| + | |||
| + | systemctl show unit environment | ||
| + | < | ||
| + | systemctl show rsshub --property=Environment | ||
| + | </ | ||
| + | |||
| service hardening | service hardening | ||
| < | < | ||
| Line 1095: | Line 852: | ||
| RestrictNamespaces=true | RestrictNamespaces=true | ||
| </ | </ | ||
| - | ===== nixos ===== | + | ===== nix ===== |
| - | apply changes to system | + | nix repl usage |
| + | |||
| + | <code bash> | ||
| + | nix repl --expr 'let eval = import < | ||
| + | :p options.services.nextcloud.settings | ||
| + | </ | ||
| < | < | ||
| - | sudo nixos-rebuild switch --flake '/ | + | nix repl nixpkgs |
| - | sudo nixos-rebuild boot --flake '/ | + | > legacyPackages.x86_64-linux.hello |
| </ | </ | ||
| - | update channel, rebuild and switch | + | run tests interactive |
| <code bash> | <code bash> | ||
| - | nixos-rebuild switch | + | nix build -L .# |
| + | ./ | ||
| + | start_all() | ||
| </ | </ | ||
| - | search package | + | get attributes of test |
| <code bash> | <code bash> | ||
| - | nix search gedit | + | nix eval .# |
| + | [" | ||
| + | nix build -L .# | ||
| </ | </ | ||
| - | nixos testing environement | + | ===== nixos ===== |
| - | < | + | apply changes to system |
| - | nix-shell -p toilet | + | |
| + | < | ||
| + | sudo nixos-rebuild switch --flake '/ | ||
| </ | </ | ||
| - | install unstable | + | search |
| <code bash> | <code bash> | ||
| - | nix-channel --add https:// | + | nix search gedit |
| - | nix-channel --update unstable | + | |
| - | nix-env -iA unstable.pdfarranger | + | |
| </ | </ | ||
| Line 1164: | Line 930: | ||
| ]; | ]; | ||
| </ | </ | ||
| + | |||
| garbade collector | garbade collector | ||
| <code bash> | <code bash> | ||
| nix-collect-garbage -d | nix-collect-garbage -d | ||
| </ | </ | ||
| + | |||
| list package files | list package files | ||
| <code bash> | <code bash> | ||
| find $(nix eval -f / | find $(nix eval -f / | ||
| </ | </ | ||
| + | |||
| install package | install package | ||
| <code bash> | <code bash> | ||
| nix-env -i icecat | nix-env -i icecat | ||
| </ | </ | ||
| + | |||
| remove package | remove package | ||
| <code bash> | <code bash> | ||
| Line 1205: | Line 975: | ||
| source venv/ | source venv/ | ||
| pip install -r requirements.txt | pip install -r requirements.txt | ||
| - | </ | ||
| - | |||
| - | local repository (nixpkgs clone) as systemwide channel | ||
| - | |||
| - | <code bash> | ||
| - | $ nix-build nixos/ | ||
| - | ... | ||
| - | / | ||
| - | $ sudo nix-channel --remove nixos | ||
| - | $ sudo nix-channel --add file:/// | ||
| - | $ sudo nix-channel --update | ||
| </ | </ | ||
| Line 1250: | Line 1009: | ||
| curl -sL https:// | curl -sL https:// | ||
| | head -n 1 | grep -o -E -e " | | head -n 1 | grep -o -E -e " | ||
| - | </ | ||
| - | allow unfree package installation nix-env | ||
| - | <code bash> | ||
| - | env NIXPKGS_ALLOW_UNFREE=1 nix-env -f / | ||
| </ | </ | ||
| Line 1285: | Line 1040: | ||
| <code bash> | <code bash> | ||
| - | git clone https:// | ||
| - | cd nixpkgs | ||
| nixpkgs-review pr 98044 | nixpkgs-review pr 98044 | ||
| + | nixpkgs-review wip --build-args=" | ||
| </ | </ | ||
| Line 1301: | Line 1055: | ||
| < | < | ||
| command-not-found telnet | command-not-found telnet | ||
| - | </ | ||
| - | |||
| - | use module from unstable | ||
| - | |||
| - | < | ||
| - | let | ||
| - | |||
| - | # FIXME | ||
| - | unstableTarball = | ||
| - | fetchTarball | ||
| - | https:// | ||
| - | |||
| - | in | ||
| - | { | ||
| - | |||
| - | disabledModules = [ | ||
| - | " | ||
| - | " | ||
| - | ]; | ||
| - | |||
| - | imports = [ | ||
| - | " | ||
| - | / | ||
| - | ]; | ||
| - | nixpkgs.config.packageOverrides = pkgs: rec { | ||
| - | unstable = import unstableTarball { }; | ||
| - | opensnitch = unstable.opensnitch; | ||
| - | }; | ||
| - | # | ||
| - | </ | ||
| - | |||
| - | overlay: use / overwrite package from custom remote or local repo / fork: | ||
| - | |||
| - | < | ||
| - | nixpkgs.overlays = [ | ||
| - | (self: super: { | ||
| - | foo2zjs = (import (builtins.fetchTarball { | ||
| - | url = | ||
| - | " | ||
| - | sha256 = " | ||
| - | }) { config = { allowUnfree = true; }; }).foo2zjs; | ||
| - | linux-wifi-hotspot = (import / | ||
| - | }) | ||
| - | ]; | ||
| </ | </ | ||
| Line 1363: | Line 1073: | ||
| </ | </ | ||
| - | use local src / source | + | override only source |
| < | < | ||
| - | src = / | + | django-oauth-toolkit |
| - | | + | version = " |
| + | |||
| + | | ||
| + | hash = " | ||
| + | }; | ||
| + | }); | ||
| </ | </ | ||
| Line 1376: | Line 1091: | ||
| </ | </ | ||
| - | package | + | locate / search file belongs to which package |
| + | < | ||
| + | nix-locate -w libnss3.so | ||
| + | </ | ||
| + | list package content | ||
| < | < | ||
| - | nixpkgs.overlays = [ | + | tree (nix-instantiate |
| - | | + | |
| - | foo2zjs = (import (builtins.fetchTarball { | + | |
| - | url = | + | |
| - | " | + | |
| - | sha256 = " | + | |
| - | }) {} ).foo2zjs; | + | |
| - | wordpress = super.wordpress.overrideAttrs (oldAttrs: rec { | + | |
| - | # Remove default plugins and themes | + | |
| - | installPhase = oldAttrs.installPhase + '' | + | |
| - | rm -r $out/ | + | |
| - | rm -r $out/ | + | |
| - | | + | |
| - | }); | + | |
| - | foo2zjs = super.foo2zjs.overrideAttrs (oldAttrs: rec { | + | |
| - | src = builtins.fetchurl { | + | |
| - | url = " | + | |
| - | sha256 = " | + | |
| - | | + | |
| - | patches = (oldAttrs.patches or []) ++ [ | + | |
| - | (pkgs.fetchpatch { | + | |
| - | url = " | + | |
| - | sha256 = " | + | |
| - | }) | + | |
| - | ]; | + | |
| - | }); | + | |
| - | }) | + | |
| - | ]; | + | |
| </ | </ | ||
| - | fetchpatch | + | nixos-shell usage |
| + | |||
| + | <code bash> | ||
| + | QEMU_NET_OPTS=" | ||
| + | sudo -E QEMU_NET_OPTS=" | ||
| + | </ | ||
| + | |||
| + | systemd one shot service | ||
| < | < | ||
| - | | + | |
| - | | + | systemd.services.nvim-symlink |
| - | ./hbpl1.patch | + | |
| + | if [[ ! -h "/root/.config/ | ||
| + | ln -s "/ | ||
| + | fi | ||
| + | | ||
| + | wantedBy = [ " | ||
| + | serviceConfig = { | ||
| + | Type = " | ||
| + | }; | ||
| + | }; | ||
| + | </code> | ||
| - | # Fix " | + | update package |
| - | # https:// | + | |
| - | (fetchpatch { | + | |
| - | url = " | + | |
| - | sha256 = " | + | |
| - | stripLen = 1; | + | |
| - | name = " | + | |
| - | }) | + | |
| - | | + | < |
| + | nix-update gelly | ||
| + | nix-update stamp --version=branch=main | ||
| + | nix-update --use-update-script python3Packages.django-filingcabinet | ||
| + | </ | ||
| + | ==== configuration ==== | ||
| + | |||
| + | prepend list to existing default configuration of option | ||
| + | |||
| + | <code nix> | ||
| + | enabledPreviewProviders = lib.mkOptionDefault ( | ||
| + | lib.mkBefore [ | ||
| + | " | ||
| + | " | ||
| + | ] | ||
| + | ); | ||
| + | </ | ||
| + | |||
| + | ==== packaging ==== | ||
| + | |||
| + | template | ||
| + | < | ||
| + | { | ||
| + | lib, | ||
| + | buildGoModule, | ||
| + | fetchFromCodeberg, | ||
| + | }: | ||
| + | |||
| + | buildGoModule (finalAttrs: | ||
| + | pname = " | ||
| + | version = " | ||
| + | __structuredAttrs = true; | ||
| + | strictDeps = true; | ||
| + | |||
| + | src = fetchFromCodeberg { | ||
| + | owner = " | ||
| + | repo = " | ||
| + | rev = " | ||
| + | hash = " | ||
| + | }; | ||
| + | |||
| + | vendorHash = " | ||
| + | |||
| + | # Tests require networking | ||
| + | doCheck = false; | ||
| + | |||
| + | meta = { | ||
| + | description = "Tool for exporting data from and importing data to Fediverse instances"; | ||
| + | homepage = " | ||
| + | license = lib.licenses.gpl3Only; | ||
| + | maintainers = with lib.maintainers; | ||
| + | mainProgram = " | ||
| + | }; | ||
| + | }) | ||
| + | </ | ||
| + | |||
| + | fetchpatch | ||
| + | |||
| + | < | ||
| + | patches = [ | ||
| + | (fetchpatch { | ||
| + | url = " | ||
| + | hash = " | ||
| + | name = " | ||
| + | }) | ||
| + | ]; | ||
| </ | </ | ||
| Line 1450: | Line 1217: | ||
| </ | </ | ||
| - | locate / search file belongs to which package | + | python modules hooks |
| < | < | ||
| - | nix-locate -w libnss3.so | + | nativeCheckInputs = [ |
| + | pytestCheckHook | ||
| + | writableTmpDirAsHomeHook | ||
| + | ] | ||
| </ | </ | ||
| - | list package content | + | update script git updater |
| < | < | ||
| - | tree (nix-instantiate --eval -E 'with import < | + | passthru.updateScript = gitUpdater |
| + | ignoredVersions = " | ||
| + | }; | ||
| </ | </ | ||
| - | nixos-shell usage | + | debuggig, run commands inside derivation |
| - | < | + | < |
| - | QEMU_NET_OPTS=" | + | nix develop |
| - | sudo -E QEMU_NET_OPTS=" | + | nix develop |
| + | nix develop -f . stamp -c bash -c ' | ||
| + | 2.88.1 | ||
| </ | </ | ||
| - | systemd one shot service | + | ===== python ===== |
| + | |||
| + | python relax dependency | ||
| < | < | ||
| - | # Symlink nvim user config for root user | + | pythonRelaxDeps = [ " |
| - | systemd.services.nvim-symlink | + | </ |
| - | | + | ==== packaging module ==== |
| - | if [[ ! -h "/root/.config/nvim" | + | |
| - | | + | systemd |
| - | | + | |
| - | | + | < |
| - | | + | { |
| - | serviceConfig = { | + | |
| - | | + | }: |
| + | |||
| + | let | ||
| + | |||
| + | defaultServiceConfig | ||
| + | | ||
| + | Group = "openproject"; | ||
| + | WorkingDirectory = " | ||
| + | StateDirectory = cfg.stateDir; | ||
| + | # Service hardening | ||
| + | ReadWritePaths = [ cfg.stateDir | ||
| + | | ||
| + | AmbientCapabilities = ""; | ||
| + | CapabilityBoundingSet = ""; | ||
| + | # ProtectClock adds DeviceAllow=char-rtc r | ||
| + | DeviceAllow = "" | ||
| + | DevicePolicy = "closed"; | ||
| + | LockPersonality = true; | ||
| + | # Loosening setting, required by Ruby daemon | ||
| + | MemoryDenyWriteExecute = false; | ||
| + | NoNewPrivileges = true; | ||
| + | RemoveIPC = true; | ||
| + | PrivateDevices = true; | ||
| + | PrivateMounts = true; | ||
| + | PrivateTmp = true; | ||
| + | PrivateUsers = true; | ||
| + | ProtectClock = true; | ||
| + | ProtectHome = true; | ||
| + | ProtectHostname = true; | ||
| + | ProtectSystem = " | ||
| + | ProtectControlGroups = true; | ||
| + | ProtectKernelLogs = true; | ||
| + | ProtectKernelModules = true; | ||
| + | ProtectKernelTunables = true; | ||
| + | ProtectProc = " | ||
| + | ProcSubset = " | ||
| + | RestrictAddressFamilies = [ | ||
| + | | ||
| + | " | ||
| + | " | ||
| + | | ||
| + | | ||
| + | RestrictRealtime = true; | ||
| + | RestrictSUIDSGID = true; | ||
| + | SystemCallArchitectures = " | ||
| + | SystemCallFilter | ||
| + | | ||
| + | # Loosening setting, required by Ruby daemon | ||
| + | #" | ||
| + | | ||
| + | | ||
| + | }; | ||
| + | |||
| + | in | ||
| + | { | ||
| + | |||
| + | [...] | ||
| + | systemd.services." | ||
| + | | ||
| + | </ | ||
| + | |||
| + | settings option | ||
| + | |||
| + | < | ||
| + | settings = lib.mkOption { | ||
| + | type = lib.types.submodule { | ||
| + | freeformType = lib.types.attrsOf ( | ||
| + | | ||
| + | lib.types.oneOf [ | ||
| + | lib.types.str | ||
| + | lib.types.bool | ||
| + | lib.types.int | ||
| + | lib.types.port | ||
| + | lib.types.path | ||
| + | ] | ||
| + | ) | ||
| + | ); | ||
| + | options = { | ||
| + | OPENPROJECT_HOST__NAME = lib.mkOption { | ||
| + | type = lib.types.str; | ||
| + | default | ||
| + | description = " | ||
| + | }; | ||
| + | PORT = lib.mkOption { | ||
| + | type = lib.types.port; | ||
| + | default = 6346; | ||
| + | description = "Port for the puma daemon to bind to."; | ||
| + | }; | ||
| }; | }; | ||
| }; | }; | ||
| + | default = { }; | ||
| + | description = '' | ||
| + | Extra configuration options to append or override. | ||
| + | For available and default option values see | ||
| + | [upstream configuration file](https:// | ||
| + | ''; | ||
| + | }; | ||
| </ | </ | ||
| - | nix repl | + | merge settings with defaults |
| - | < | + | < |
| - | nix repl '< | + | config = lib.mkIf cfg.enable { |
| - | # wordpressPackages.plugins.gutenberg.meta.license | + | |
| + | services.openproject.settings = lib.mkMerge [ | ||
| + | { | ||
| + | OPENPROJECT_RAILS_CACHE_STORE = " | ||
| + | OPENPROJECT_CACHE__MEMCACHE__SERVER = " | ||
| + | OPENPROJECT_CACHE__NAMESPACE = " | ||
| + | } | ||
| + | ]; | ||
| </ | </ | ||
| - | ==== packaging | + | |
| + | migrate option | ||
| + | |||
| + | < | ||
| + | imports | ||
| + | (mkRenamedOptionModule | ||
| + | [ " | ||
| + | ]; | ||
| + | |||
| + | options.services.nextcloud | ||
| + | enable | ||
| + | </ | ||
| + | |||
| + | lib.getExe | ||
| + | |||
| + | < | ||
| + | " | ||
| + | </ | ||
| + | ===== tools ===== | ||
| + | |||
| + | run / test update script | ||
| + | < | ||
| + | nix-shell maintainers/ | ||
| + | </ | ||
| + | |||
| + | ===== snippets | ||
| fetchurl | fetchurl | ||
| Line 1784: | Line 1688: | ||
| ''; | ''; | ||
| </ | </ | ||
| - | ==== tests ==== | ||
| - | run tests interactively | + | ==== system config ==== |
| - | < | + | use module and package from remote repo |
| - | nix build -L -f . nixosTests.invoiceplane.driverInteractive | + | |
| - | ./result/bin/nixos-test-driver | + | < |
| - | > startAll | + | { |
| - | > testScript | + | |
| - | > $machine-> | + | nixpkgs.url = " |
| - | > print($machine-> | + | |
| + | }; | ||
| + | }; | ||
| </ | </ | ||
| - | ==== nixops ==== | + | < |
| + | disabledModules | ||
| + | " | ||
| + | ]; | ||
| + | imports | ||
| + | " | ||
| + | ]; | ||
| - | setup | + | nixpkgs.overlays |
| - | <file - / | + | |
| - | virtualisation.libvirtd.enable = true; | + | |
| - | users.extraUsers.myuser.extraGroups | + | |
| - | </ | + | }) |
| - | + | ]; | |
| - | <code bash> | + | |
| - | nix-env -iA nixos-unstable.nixopsUnstable | + | |
| - | sudo mkdir / | + | |
| - | sudo chgrp libvirtd / | + | |
| - | sudo chmod g+w / | + | |
| - | sudo virsh pool-define-as default dir --target / | + | |
| - | sudo virsh pool-autostart default | + | |
| - | sudo virsh pool-start default | + | |
| - | nixops create -d example-libvirtd examples/ | + | |
| - | nixops deploy -d example-libvirtd | + | |
| - | nixops list | + | |
| </ | </ | ||
| - | connect to instance | + | overlay examples |
| - | <code bash> | + | |
| - | nixops ssh -d example-libvirtd machine | + | < |
| + | nixpkgs.overlays = [ | ||
| + | | ||
| + | |||
| + | python3 = super.python3.override { | ||
| + | packageOverrides = python-final: python-prev: | ||
| + | mypy = python-prev.mypy.overridePythonAttrs (old: { | ||
| + | nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ | ||
| + | | ||
| + | ]; | ||
| + | }); | ||
| + | }; | ||
| + | }; | ||
| + | |||
| + | bcachefs-tools = super.bcachefs-tools.overrideAttrs (final: oldAttrs: { | ||
| + | version = " | ||
| + | src = super.fetchFromGitHub { | ||
| + | owner = " | ||
| + | repo = " | ||
| + | rev = " | ||
| + | hash = " | ||
| + | }; | ||
| + | cargoHash = null; | ||
| + | cargoDeps = pkgs.rustPlatform.fetchCargoVendor { | ||
| + | src = final.src; | ||
| + | hash = " | ||
| + | }; | ||
| + | }); | ||
| + | |||
| + | }) | ||
| + | ]; | ||
| </ | </ | ||
| + | ==== modules ==== | ||
| - | delete deployment, delete machine | + | converting cfg.settings to strings only for systemd environment variables etc |
| - | <code bash> | + | |
| - | nixops delete -d example-libvirtd | + | |
| - | nixops destroy --include nix-http | + | < |
| + | let | ||
| + | configEnv = concatMapAttrs ( | ||
| + | name: value: | ||
| + | optionalAttrs (value != null) { | ||
| + | ${name} = if isBool value then boolToString value else toString value; | ||
| + | } | ||
| + | ) cfg.settings; | ||
| + | in | ||
| </ | </ | ||
| + | ==== flake ==== | ||
| - | start, stop destroy machine foo | + | local file path as flake input |
| - | < | + | < |
| - | nixops start --include foo | + | inputs.verwaltungstracker.url = " |
| - | nixops stop --include foo | + | |
| - | nixops destroy --include foo | + | |
| </ | </ | ||
| - | list machines | + | development flake.nix |
| - | < | + | < |
| - | nixops info | + | { |
| + | description = " | ||
| + | |||
| + | inputs.nixpkgs.url = " | ||
| + | |||
| + | outputs = { self, nixpkgs, ... }@inputs: | ||
| + | let | ||
| + | pkgs = nixpkgs.legacyPackages.x86_64-linux; | ||
| + | in { | ||
| + | devShells.x86_64-linux.default = pkgs.mkShell { | ||
| + | packages = [ pkgs.pnpm ]; | ||
| + | }; | ||
| + | |||
| + | }; | ||
| + | } | ||
| </ | </ | ||
| ===== filesystem ===== | ===== filesystem ===== | ||
| Line 1850: | Line 1800: | ||
| <code bash> | <code bash> | ||
| fatlabel /dev/sdb1 " | fatlabel /dev/sdb1 " | ||
| - | </ | ||
| - | |||
| - | grow ext4 partition live | ||
| - | <code bash> | ||
| - | $ growpart /dev/sda 2 | ||
| - | $ resize2fs /dev/sda2 | ||
| </ | </ | ||
| Line 1944: | Line 1888: | ||
| </ | </ | ||
| - | ===== avahi ===== | + | |
| - | discover local services | + | |
| + | ===== npm ===== | ||
| + | |||
| + | check for major updates | ||
| <code bash> | <code bash> | ||
| - | avahi-browse | + | npm-check-updates |
| - | </ | + | |
| - | ===== curlftpfs ===== | + | |
| - | <code bash> | + | |
| - | curlftpfs ftp.example.com /mnt/ftp/ -o user=username: | + | |
| </ | </ | ||
| ===== pnpm ===== | ===== pnpm ===== | ||
| + | |||
| <code bash> | <code bash> | ||
| pnpm init | pnpm init | ||
| pnpm install jquery@3.5.1 --save # see npmjs.com | pnpm install jquery@3.5.1 --save # see npmjs.com | ||
| </ | </ | ||
| - | update packages | + | |
| + | check package updates | ||
| <code bash> | <code bash> | ||
| pnpm outdated | pnpm outdated | ||
| + | </ | ||
| + | |||
| + | update specific package | ||
| + | <code bash> | ||
| + | pnpm update @nextcloud/ | ||
| </ | </ | ||
| ===== gitlab-ci ===== | ===== gitlab-ci ===== | ||
| Line 1981: | Line 1932: | ||
| ===== postmarketOS ===== | ===== postmarketOS ===== | ||
| + | |||
| + | ====== personal setup ====== | ||
| + | * enable beacondb in geoclue conf | ||
| + | |||
| + | ====== notes ====== | ||
| + | update checksum | ||
| + | <code bash> | ||
| + | pmbootstrap checksum device-samsung-dream | ||
| + | </ | ||
| general chroot management | general chroot management | ||
| Line 2043: | Line 2003: | ||
| md5sum -t recovery.tar >> recovery.tar | md5sum -t recovery.tar >> recovery.tar | ||
| mv recovery.tar recovery.tar.md5 | mv recovery.tar recovery.tar.md5 | ||
| + | </ | ||
| + | |||
| + | apk list installed files | ||
| + | |||
| + | < | ||
| + | apk info -L calls-systemd | ||
| </ | </ | ||
| ===== parted ===== | ===== parted ===== | ||
| Line 2098: | Line 2064: | ||
| </ | </ | ||
| - | ===== cups ===== | ||
| - | list printers | + | ===== qemu ===== |
| - | < | + | |
| - | $ lpstat -p -d | + | |
| - | printer Dell_1250c is idle. enabled since Tue 28 Dec 2021 09:44:59 AM UTC | + | |
| - | printer Dell_1250c_USB is idle. enabled since Tue 28 Dec 2021 09:44:59 AM UTC | + | |
| - | </ | + | |
| - | print file | + | booting armv7 alpinelinux |
| - | < | + | < |
| - | lp -d Dell_1250c_USB | + | # download kernel and stuff from here http://dl-cdn.alpinelinux.org/ |
| + | qemu-system-arm -M virt -m 512M -cpu cortex-a15 -kernel vmlinuz-lts -initrd initramfs-lts -append " | ||
| </ | </ | ||
| - | list jobs | + | ===== mariadb ===== |
| - | < | + | |
| - | $ lpstat | + | |
| - | Dell_1250c_USB-2 | + | |
| - | </ | + | |
| - | cancel job | + | import dump |
| - | < | + | < |
| - | cancel 1 | + | mariadb -u root nextcloud < mydump.sql |
| </ | </ | ||
| - | ===== qemu ===== | + | list tables and size of database nextcloud |
| - | + | ||
| - | booting armv7 alpinelinux | + | |
| <code bash> | <code bash> | ||
| - | # download kernel and stuff from here http://dl-cdn.alpinelinux.org/ | + | SELECT |
| - | qemu-system-arm -M virt -m 512M -cpu cortex-a15 -kernel vmlinuz-lts -initrd initramfs-lts -append " | + | table_name AS `Table`, |
| + | ROUND(((data_length + index_length) | ||
| + | table_rows AS `Approx Rows` | ||
| + | FROM information_schema.tables | ||
| + | WHERE table_schema | ||
| + | ORDER BY (data_length + index_length) DESC; | ||
| </ | </ | ||
| Line 2182: | Line 2142: | ||
| </ | </ | ||
| + | ===== helix ===== | ||
| + | multi-cursor selection mode | ||
| + | |||
| + | < | ||
| + | Normal mode -> V (visual mode) -> Shift+C (multiple times) -> i (insert mode) -> Enter something | ||
| + | ESC -> , | ||
| + | </ | ||
| + | |||
| + | sort | ||
| + | |||
| + | < | ||
| + | - select multiple lines | ||
| + | - press Alt-S | ||
| + | - type ": | ||
| + | </ | ||
| + | |||
| + | copy to clipboard | ||
| + | |||
| + | |||
| + | < | ||
| + | - select area | ||
| + | - press < | ||
| + | </ | ||
| + | |||
| + | select all lines | ||
| + | |||
| + | < | ||
| + | % | ||
| + | </ | ||
| + | |||
| + | buffer close | ||
| + | |||
| + | < | ||
| + | :bc | ||
| + | </ | ||
| + | |||
| + | helix editor vertical split | ||
| + | |||
| + | < | ||
| + | Ctrl-w v | ||
| + | </ | ||
| + | ===== traceroute ===== | ||
| + | |||
| + | traceroute TCP packages specific port | ||
| + | < | ||
| + | traceroute -T -p 25 mail.karlsruhe.de | ||
| + | </ | ||
| + | |||
| + | ===== curl ===== | ||
| + | |||
| + | fetch headers | ||
| + | < | ||
| + | curl -sI https:// | ||
| + | </ | ||
| + | |||
| + | ===== ripgrep ===== | ||
| + | |||
| + | multiline regex whole file | ||
| + | |||
| + | < | ||
| + | rg -U --multiline-dotall ' | ||
| + | </ | ||
| + | |||
| + | with proximity, only 1-2 lines in between | ||
| + | |||
| + | <code bash> | ||
| + | rg -U --multiline-dotall " | ||
| + | </ | ||
| + | |||
| + | search only in specific file extensions | ||
| + | |||
| + | < | ||
| + | rg -g " | ||
| + | </ | ||
| + | |||
| + | ===== act ===== | ||
| + | |||
| + | manually run github workflow locally | ||
| + | |||
| + | < | ||
| + | act -W .github/ | ||
| + | </ | ||
| + | |||
| + | map custom docker image to some other | ||
| + | |||
| + | < | ||
| + | act -W .github/ | ||
| + | </ | ||
| + | |||
| + | ===== composer ===== | ||
| + | |||
| + | upgrade to new major version | ||
| + | |||
| + | <code bash> | ||
| + | composer outdated | ||
| + | composer require --dev psalm/ | ||
| + | </ | ||
| + | |||
| + | ===== namei ===== | ||
| + | |||
| + | list permissions, | ||
| + | |||
| + | <code bash> | ||
| + | [picloud@picloudrv: | ||
| + | f: / | ||
| + | drwxr-xr-x root | ||
| + | drwxr-xr-x root | ||
| + | drwxrwxr-t root | ||
| + | dr-xr-xr-x root | ||
| + | lrwxrwxrwx root | ||
| + | drwxr-xr-x root | ||
| + | drwxr-xr-x root | ||
| + | drwxr-xr-x root | ||
| + | drwxr-xr-x root | ||
| + | drwxr-x--- invoiceplane caddy invoice.project-insanity.org | ||
| + | drwxr-x--- invoiceplane caddy uploads | ||
| + | drwxr-x--- invoiceplane caddy temp | ||
| + | Rechnung_129.xml - No such file or directory | ||
| + | </ | ||
| + | |||
| + | ===== reuse ===== | ||
| + | |||
| + | general usage | ||
| + | |||
| + | <code bash> | ||
| + | reuse download MIT | ||
| + | reuse annotate --copyright "Jonas Heinrich < | ||
| + | .github/ | ||
| + | reuse lint | ||
| + | </ | ||
| + | |||
| + | ===== kernel ===== | ||
| + | |||
| + | query config of current running kernel | ||
| + | |||
| + | <code bash> | ||
| + | zcat / | ||
| + | </ | ||
| + | |||
| + | ===== fd ===== | ||
| + | |||
| + | search for all files with specific extension in directory / | ||
| + | |||
| + | <code bash> | ||
| + | fd --type f -e fm . / | ||
| + | </ | ||
| + | |||
| + | zip all files with specific file extension | ||
| + | |||
| + | <code bash> | ||
| + | fd -t f -e fm . / | zip source -@ | ||
| + | </ | ||
| + | |||
| + | file creation timespan | ||
| + | |||
| + | <code bash> | ||
| + | fd --type f -e pdf --change-newer-than " | ||
| + | </ | ||
| + | |||
| + | execute command | ||
| + | |||
| + | <code bash> | ||
| + | fd --type f -e doc -e docx -e pdf -i gabriel -x cp --backup=t {} / | ||
| + | </ | ||
| + | |||
| + | find filenames unallowed characters | ||
| + | |||
| + | <code bash> | ||
| + | fd '[^A-Z a-züö@0-9._-]' | ||
| + | </ | ||
| + | |||
| + | remove empty dirs in dir " | ||
| + | |||
| + | <code bash> | ||
| + | fd --type empty --type directory . / | ||
| + | </ | ||
onny/notizen.1683708036.txt.gz · Last modified: by 10.200.0.1 · Currently locked by: 10.250.0.1
