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
Next revisionBoth sides next revision
onny:notizen [2023/07/06 07:51] – [fish] 10.200.0.1onny:notizen [2024/02/20 17:46] – [git] 127.0.0.1
Line 1: Line 1:
-===== kernel ===== 
- 
-grep kernel config running system 
-<code bahs> 
-zcat /proc/config.gz | grep VDSO 
-</code> 
- 
  
 ===== bash ===== ===== bash =====
Line 95: Line 88:
 chmod +x $FILE chmod +x $FILE
 $FILE "$@" $FILE "$@"
-</code> 
-==== sed ==== 
-Mit sed inplace eine Zeile zu einer Datei hinzufügen: 
-<code bash> 
-sed -i '9i#include <algorithm>' liboffsetfinder64/vmem.cpp 
-</code> 
-add to end of file  
-<code bash> 
-sed -i -e '$aretry $@' retry.sh 
-</bash> 
-Comment out specific line matching a string 
-<code bash> 
-sudo sed -e '/pam_securetty.so/ s/^#*/#/' -i delugecontainer/etc/pam.d/login 
-</code> 
-comment out multiple lines / range 
-<code bash> 
-sed -i "28,33 s/# *//" autogen.sh 
-</code> 
-regex parse value of xml tags 
-<code bash> 
-sed -n 's/.*<id>\(.*\)<\/id>.*/\1/p' myfile.txt 
-</code> 
-delete multiple lines 
-<code bash> 
-sed -i '2,3d;5d;8d' file 
 </code> </code>
  
-insert line after match 
-<code bash> 
-sed  '/\[option\]/a Hello World' input 
-</code> 
 ==== grep ==== ==== grep ====
 regex match group regex match group
Line 158: Line 122:
 </code> </code>
  
-==== curl ==== 
-post data 
-<code bash> 
-curl --data "UserId=eb8c2ec5352843d3a16ca11c26d3551c&Name=lolorollo&api_key=a5dc4e***9c9e0a***3" "https://turbotux.de/Playlists?UserId=eb8c2ec5352843d3a16ca11c26d3551c&Name=lolorollo&api_key=a5***d***9e0***3" 
-</code> 
-download and extract archive 
-<code bash> 
-curl http://wordpress.org/latest.tar.gz | tar xvz 
-</code> 
-set host header 
-<code bash> 
-torify curl --header "Host: http.pi" blog.project-insanity.org 
-</code> 
  
 ==== patching ==== ==== patching ====
Line 670: Line 621:
 git remote set-url origin gitlab@http-new.pi:onny/web-wikidict.git git remote set-url origin gitlab@http-new.pi:onny/web-wikidict.git
 </code> </code>
-tagging +
-<code bash> +
-git tag -a v0.1 -m 'whackspace wordpress theme init' +
-</code>+
 merge commits from a remote repository merge commits from a remote repository
 +
 <code bash> <code bash>
 git fetch https://github.com/rfc2822/davdroid.git master git fetch https://github.com/rfc2822/davdroid.git master
Line 886: Line 835:
 </code> </code>
   * check spamminess of email server: https://www.mail-tester.com/   * check spamminess of email server: https://www.mail-tester.com/
-  * manual imap login +
-openssl imaps login +
-<code> +
-openssl s_client -connect mail.sexypump.de:993 -crlf +
-A login cypherpunk cypherpunk +
-</code> +
-get quota +
-<code> +
-a GETQUOTAROOT INBOX +
-</code> +
-get msg count of folder +
-<code> +
-a LIST INBOX * +
-* LIST (\HasChildren) "." INBOX +
-* LIST (\HasNoChildren \UnMarked) "." "INBOX.Deleted Messages" +
-* LIST (\HasNoChildren \UnMarked) "." "INBOX.Sent Messages" +
-* LIST (\HasNoChildren \UnMarked \Trash) "." INBOX.Trash +
-* LIST (\HasNoChildren \UnMarked \Sent) "." INBOX.Sent +
-* LIST (\HasNoChildren \UnMarked) "." INBOX.Notes +
-* LIST (\HasNoChildren \UnMarked \Junk) "." INBOX.Junk +
-* LIST (\HasNoChildren \UnMarked \Drafts) "." INBOX.Drafts +
-* LIST (\HasNoChildren \UnMarked) "." INBOX.AntiSpam +
-a OK List completed (0.001 + 0.000 secs). +
-a SELECT INBOX +
-</code>+
 send smtp mail send smtp mail
 <code> <code>
Line 1298: Line 1223:
  
 <code> <code>
-let  +nixpkgs.config.packageOverrides = pkgs: rec { 
- +  unstable = import unstableTarball { }; 
-  # FIXME +  opensnitch = unstable.opensnitch; 
-  unstableTarball = +};
-    fetchTarball +
-      https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz; +
- +
-in +
-+
- +
-  disabledModules = [ +
-    "programs/firejail.nix" +
-    "services/web-apps/nextcloud.nix" +
-  ]; +
- +
-  imports = [ +
-    "${fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz"}/nixos/modules/services/security/opensnitch.nix" +
-    /home/onny/projects/nixpkgs2/nixos/modules/services/networking/create_ap.nix +
-  ]; +
-  nixpkgs.config.packageOverrides = pkgs: rec { +
-    unstable = import unstableTarball { }; +
-    opensnitch = unstable.opensnitch; +
-  }+
-  #services.opensnitch.enable = true;+
 </code> </code>
  
Line 1353: Line 1258:
     '';     '';
   });   });
-</code> 
- 
-use local src / source 
- 
-<code> 
-  src = /home/onny/projects/linux-wifi-hotspot; 
-  unpackPhase = ''cp -r --no-preserve=mode $src/* .''; 
 </code> </code>
  
Line 1398: Line 1296:
       });       });
     })     })
-  ]; 
-</code> 
- 
-fetchpatch 
- 
-<code> 
-  patches = [ 
-    # Support HBPL1 printers https://www.dechifro.org/hbpl/ 
-    ./hbpl1.patch 
- 
-    # Fix "Unimplemented paper code" error for hbpl1 printers 
-    # https://github.com/mikerr/foo2zjs/pull/2 
-    (fetchpatch { 
-      url = "https://patch-diff.githubusercontent.com/raw/mikerr/foo2zjs/pull/2.patch"; 
-      sha256 = "0lvbryw6ymh0ahwkhqsgmjimg5saa8b1xnxmyyjxrbi3l3a6fbvy"; 
-      stripLen = 1; 
-      name = "fix_papercode_error.patch"; 
-    }) 
- 
   ];   ];
 </code> </code>
Line 1474: Line 1353:
     };     };
   };   };
-</code> 
- 
-nix repl 
- 
-<code bash> 
-nix repl '<nixpkgs>' 
-# wordpressPackages.plugins.gutenberg.meta.license 
 </code> </code>
 ==== packaging ==== ==== packaging ====
Line 1775: Line 1647:
       --add-flags "-jar $out/lib/briar-desktop.jar"       --add-flags "-jar $out/lib/briar-desktop.jar"
   '';   '';
-</code> 
-==== tests ==== 
- 
-run tests interactively 
- 
-<code bash> 
-nix build -L -f . nixosTests.invoiceplane.driverInteractive 
-./result/bin/nixos-test-driver 
-> startAll 
-> testScript 
-> $machine->succeed("touch /tmp/foo") 
-> print($machine->succeed("pwd")) # Show stdout of command 
 </code> </code>
  
Line 1842: Line 1702:
 <code bash> <code bash>
 fatlabel /dev/sdb1 "mystick" fatlabel /dev/sdb1 "mystick"
-</code> 
- 
-grow ext4 partition live 
-<code bash> 
-$ growpart /dev/sda 2 
-$ resize2fs /dev/sda2 
 </code> </code>
  
Line 1936: Line 1790:
 </code> </code>
  
-===== avahi ===== +
-discover local services +
-<code bash> +
-avahi-browse --all --ignore-local --resolve --terminate +
-</code>+
 ===== curlftpfs ===== ===== curlftpfs =====
 <code bash> <code bash>
onny/notizen.txt · Last modified: 2024/05/22 12:10 by 10.250.0.1