User Tools

Site Tools


linux

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
linux [2023/10/22 18:49] jotasandokulinux [2025/10/25 14:23] (current) jotasandoku
Line 33: Line 33:
  
 note that tar by itself just packetize not compress. We need flags as z compress. ALSO, tar is oriented ro 'pack' folders. If we want to zip a file we just use gzip <file> note that tar by itself just packetize not compress. We need flags as z compress. ALSO, tar is oriented ro 'pack' folders. If we want to zip a file we just use gzip <file>
-  tar -cvf vmx.tar /root/vmx-test/ # whole folder+  tar -czfv vmx.tar.gz /root/vmx-test/     pack whole folder 
 +  tar -xzvf ansiblepi.tar.gz               # unpack same folder
   tar -xvf docs.tar # to extract it, folder tree same but from the point we are   tar -xvf docs.tar # to extract it, folder tree same but from the point we are
   tar -xvf cvd.tar.gz *   tar -xvf cvd.tar.gz *
Line 536: Line 537:
   git diff origin/master   git diff origin/master
   # Choose to merge or rebase (I prefer rebase)   # Choose to merge or rebase (I prefer rebase)
-  git rebase origin/master+  git checkout feature 
 +  git rebase main 
 +  ! The above, rebases ‘feature’ into main. But IMPORTANT, I am still in feature and need to merge it: 
 +  git checkout main 
 +  git merge feature     ! Or PR in github Or PR in github
      
   # And if either I or somebody else makes a commit that breaks something:   # And if either I or somebody else makes a commit that breaks something:
Line 557: Line 562:
  
  
-\\ +---- 
-GITLAB NOTES:\\+GITHUB NOTES 
 + 
 +[[https://www.youtube.com/watch?v=8A4TsoXJOs8]] 
 + 
 +{{:pull_requests.jpg?400|}} 
 + 
 +---- 
 + 
 +GITLAB NOTES: 
 If we have merged in gitlab but there's a bit of a mess in my local repo, we do this. Also recommended as a regular HOUSEKEEPING. Reason is that **git fetch --prune delete the reference to branches that don't exist on the remote anymore. Is really a macro equal to git fetch --all && git remote prune** If we have merged in gitlab but there's a bit of a mess in my local repo, we do this. Also recommended as a regular HOUSEKEEPING. Reason is that **git fetch --prune delete the reference to branches that don't exist on the remote anymore. Is really a macro equal to git fetch --all && git remote prune**
  
Line 1010: Line 1024:
 ==== Coding Assistants ==== ==== Coding Assistants ====
 === Captain Stack === === Captain Stack ===
 +  //find binary search in javascript. << stop just after the dot and wait for the suggestions
 +
 +**Use Alt+] and Alt+[ to move through suggestions**
  
 === Github Copilot === === Github Copilot ===
 Oreilly lessons [[https://github.com/timothywarner/chatgptclass]] Oreilly lessons [[https://github.com/timothywarner/chatgptclass]]
   * Suggestions   * Suggestions
 +    * Ask with a hash and then really helps more hashes and ''# Example: input:hsgdsh output shdgd''
 +    * To move between suggestions there are key shortcuts [[https://docs.github.com/en/copilot/configuring-github-copilot/configuring-github-copilot-in-your-environment|External Link]]
   * Unit tests   * Unit tests
  
Line 1052: Line 1071:
   !The below (like .pre-commit-config.yaml) **needs to be run in every new repo we want pre-commit to be!**   !The below (like .pre-commit-config.yaml) **needs to be run in every new repo we want pre-commit to be!**
   pre-commit install    # <<< Don't forget this one so the pre-commit scripts are Installed!   pre-commit install    # <<< Don't forget this one so the pre-commit scripts are Installed!
-  pre-commit auroupdate+  pre-commit autoupdate
      
 And be sure both .gitignore an .pre-commit-config.yaml are added to the repo: And be sure both .gitignore an .pre-commit-config.yaml are added to the repo:
Line 1703: Line 1722:
  
   (in cron (TBC)):  @reboot autossh -N -f -i -R 8081:localhost:22 pi@panda314159.duckdns.org &   (in cron (TBC)):  @reboot autossh -N -f -i -R 8081:localhost:22 pi@panda314159.duckdns.org &
 +  
 +
 +----
 +===== UBUNTU 22 - NEW INSTALLS =====
 +** Important **: During installation, select an appropiate uid and gui, not in use in the nfs server. In our case: 1010 and 1010 will work.
 +Example : santosj uid: 1010 ; gui: 1010
 +
 +==== NFS ====
 +For the installation (server and client), follow this link: [[https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-20-04|External Link]]
 +
 +In the server Add a new line like this to ''/etc/exports'' repalce the IP with the one for the new client 
 +  /home/pi        192.168.0.11(rw,async,no_root_squash,no_subtree_check)
 +  systemctl restart nfs-server
 +  exportfs -av
 +
 +In the server as well We create the same user as the client (with the same uid). Then we add that user to the ''pi'' group. Finally we change permissions for the folder we want to have write privileges:
 +  useradd -u 1010 santosj    # creates the user with the matching uid. no need to have a home folder 
 +  usermod -a -G pi santosj    # adds ''santosj'' to the server's ''pi'' group  
 +  chmod -R ug+rw /home/pi/Downloads    # This allos group members (''santosj'' among them) to rw in the folder
 +  
 +In the client we create the mounting folder, we add fstab for automount and also can try to mount in manually
 +  sudo cat /etc/fstab
 +  192.168.0.112:/home/pi /home/jaimenfs/nfs nfs defaults,user,noauto,relatime,rw 0 0
 +  #
 +  (santosj)$ mkdir nfs
 +  (santosj)$ mount 192.168.0.112:/home/pi /home/jaimenfs/nfs    # the IP is the one of the nfs server
 +  
 +
 +==== Audio ====
 +If headphones connect but no audio, remove pulseaudio and install new pipewire [[https://linuxconfig.org/how-to-install-pipewire-on-ubuntu-linux|External Link]]
 +
 +
 +
linux.1698000587.txt.gz · Last modified: (external edit) · Currently locked by: 216.73.216.48