Site Tools


onny:notizen

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
onny:notizen [2026/09/01 22:26] – [act] 10.250.0.1onny:notizen [2026/10/13 11:49] (current) – [nixos] 2001:7c0:200:300:b:5000:0:2ff
Line 93: Line 93:
 <code bash> <code bash>
 grep -Po "(?<=Version: )([0-9]|\.)*(?=\s|\$)" style.css grep -Po "(?<=Version: )([0-9]|\.)*(?=\s|\$)" style.css
-</code> 
- 
-==== fd ==== 
-search for all files with specific extension in directory / 
-<code bash> 
-fd --type f -e fm . / 
-</code> 
- 
-zip all files with specific file extension 
-<code bash> 
-fd -t f -e fm . / | zip source -@ 
-</code> 
- 
-file creation timespan 
-<code bash> 
-fd --type f -e pdf --change-newer-than "2020-09-09" --changed-before "2020-10-01" . 
-</code> 
- 
-execute command 
-<code bash> 
-fd --type f -e doc -e docx -e pdf -i gabriel -x cp --backup=t {} /tmp/gabriel/ 
-</code> 
- 
-find filenames unallowed characters 
-<code bash> 
-fd '[^A-Z a-züö@0-9._-]' remote/200_Archiv/CP_Dont_Touch 
 </code> </code>
  
Line 497: Line 471:
 git commit --amend git commit --amend
 git rebase --continue git rebase --continue
 +</code>
 +
 +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
 </code> </code>
  
Line 893: Line 873:
 start_all() start_all()
 </code> </code>
 +
 +get attributes of test
 +
 +<code bash>
 +nix eval .#nixosTests.nextcloud --apply builtins.attrNames --json
 +["with-imaginary34"]
 +nix build -L .#nixosTests.nextcloud.with-imaginary34
 +</code>
 +
 ===== nixos ===== ===== nixos =====
  
Line 1143: Line 1132:
 nix-update --use-update-script python3Packages.django-filingcabinet nix-update --use-update-script python3Packages.django-filingcabinet
 </code> </code>
-==== packaging package ====+ 
 +run dynamically linked app 
 + 
 +<code bash> 
 +NIXPKGS_ALLOW_UNFREE=1 nix run --impure nixpkgs#steam-run -- ./pdfcraft 
 +</code> 
 +==== configuration ==== 
 + 
 +prepend list to existing default configuration of option 
 + 
 +<code nix> 
 +enabledPreviewProviders = lib.mkOptionDefault ( 
 +  lib.mkBefore [ 
 +    "OC\\Preview\\Imaginary" 
 +    "OC\\Preview\\ImaginaryPDF" 
 +  ] 
 +); 
 +</code> 
 + 
 +==== packaging ====
  
 template template
Line 2071: Line 2079:
 </code> </code>
  
-===== mariadb =====+===== mariadb (mysql) =====
  
 import dump import dump
 <code bash> <code bash>
-mariadb -u root nextcloud < mydump.sql+mycli -u root nextcloud < mydump.sql
 </code> </code>
  
Line 2089: Line 2097:
 </code> </code>
  
 +enable logging
 +
 +<code sql>
 +SET GLOBAL general_log = 0;
 +SET GLOBAL log_output = 'FILE';
 +SET GLOBAL general_log_file = '/var/lib/mysql/general.log';
 +SET GLOBAL general_log = 1;
 +</code>
 +<code bash>
 +ls -l /tmp/systemd-private-*-mysql.service-*/tmp/mariadb-general.log
 +</code>
 ===== postgresql ===== ===== postgresql =====
  
Line 2175: Line 2194:
 <code> <code>
 :bc :bc
 +</code>
 +
 +helix editor vertical split
 +
 +<code>
 +Ctrl-w v
 +</code>
 +
 +update or reload current buffer
 +<code>
 +:reload
 </code> </code>
 ===== traceroute ===== ===== traceroute =====
Line 2193: Line 2223:
  
 multiline regex whole file multiline regex whole file
 +
 <code> <code>
 rg -U --multiline-dotall 'bundlerEnv.*updateScript' rg -U --multiline-dotall 'bundlerEnv.*updateScript'
 +</code>
 +
 +with proximity, only 1-2 lines in between
 +
 +<code bash>
 +rg -U --multiline-dotall "depsBuildBuild(?:[^\n]*\n){0,2}[^\n]*buildInputs"
 </code> </code>
  
 search only in specific file extensions search only in specific file extensions
 +
 <code> <code>
 rg -g "*.sh" -l "src.tag" pkgs/by-name/ rg -g "*.sh" -l "src.tag" pkgs/by-name/
Line 2216: Line 2254:
 </code> </code>
  
-===== compuser =====+===== composer =====
  
 upgrade to new major version upgrade to new major version
Line 2223: Line 2261:
 composer outdated composer outdated
 composer require --dev psalm/phar:^6.0 composer require --dev psalm/phar:^6.0
 +</code>
 +
 +===== namei =====
 +
 +list permissions, users file path
 +
 +<code bash>
 +[picloud@picloudrv:~]$ sudo namei -l /nix/store/c12wcqvlkcildargvd0nnxryl07r731x-invoiceplane-invoice.project-insanity.org-riscv64-unknown-linux-gnu-1.7.1/uploads/temp/Rechnung_129.xml
 +f: /nix/store/c12wcqvlkcildargvd0nnxryl07r731x-invoiceplane-invoice.project-insanity.org-riscv64-unknown-linux-gnu-1.7.1/uploads/temp/Rechnung_129.xml
 +drwxr-xr-x root         root   /
 +drwxr-xr-x root         root   nix
 +drwxrwxr-t root         nixbld store
 +dr-xr-xr-x root         root   c12wcqvlkcildargvd0nnxryl07r731x-invoiceplane-invoice.project-insanity.org-riscv64-unknown-linux-gnu-1.7.1
 +lrwxrwxrwx root         root   uploads -> /var/lib/invoiceplane/invoice.project-insanity.org/uploads
 +drwxr-xr-x root         root     /
 +drwxr-xr-x root         root     var
 +drwxr-xr-x root         root     lib
 +drwxr-xr-x root         root     invoiceplane
 +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
 +</code>
 +
 +===== reuse =====
 +
 +general usage
 +
 +<code bash>
 +reuse download MIT
 +reuse annotate --copyright "Jonas Heinrich <heinrich@synyx.de>" --license MIT \
 +  .github/pull_request_template.md flake.nix nextcloud-extras.nix psalm.xml
 +reuse lint
 +</code>
 +
 +===== kernel =====
 +
 +query config of current running kernel 
 +
 +<code bash>
 +zcat /proc/config.gz | rg CONFIG_RUST
 +</code>
 +
 +===== fd =====
 +
 +search for all files with specific extension in directory /
 +
 +<code bash>
 +fd --type f -e fm . /
 +</code>
 +
 +zip all files with specific file extension
 +
 +<code bash>
 +fd -t f -e fm . / | zip source -@
 +</code>
 +
 +file creation timespan
 +
 +<code bash>
 +fd --type f -e pdf --change-newer-than "2020-09-09" --changed-before "2020-10-01" .
 +</code>
 +
 +execute command
 +
 +<code bash>
 +fd --type f -e doc -e docx -e pdf -i gabriel -x cp --backup=t {} /tmp/gabriel/
 +</code>
 +
 +find filenames unallowed characters
 +
 +<code bash>
 +fd '[^A-Z a-züö@0-9._-]' remote/200_Archiv/CP_Dont_Touch
 +</code>
 +
 +remove empty dirs in dir "data"
 +
 +<code bash>
 +fd --type empty --type directory . /path/to/specific/dir -X rmdir
 </code> </code>
onny/notizen.1788301610.txt.gz · Last modified: by 10.250.0.1